Skip to content

How to use pikaday for cross-browser date selection? #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sjordan1975 opened this issue Jun 25, 2017 · 5 comments
Closed

How to use pikaday for cross-browser date selection? #238

sjordan1975 opened this issue Jun 25, 2017 · 5 comments

Comments

@sjordan1975
Copy link

sjordan1975 commented Jun 25, 2017

I am trying to use pikaday as an alternative to bugs raised by #231.

However, I cannot seem to get dates to work.

I have created a fiddle.

Issues I'm facing:

  1. The form has the same bug as Entering date with keyboard does not work ($50 bounty to fix) #231. Entering values with the keyboard gives incorrect results.
  2. Selecting a value from the pop-up calendar does not seem to set the model value. Note, the value of dob in the model does not change.

Please update my example to demonstrate the use of pikaday.

@icebob
Copy link
Member

icebob commented Jun 30, 2017

The field is working, but there was a circular JSON stringify error when tried to prettyJSON the schema.

https://jsfiddle.net/icebob/6tkhy8m9/2/

@sjordan1975
Copy link
Author

How about the first point; I seem unable to successfully enter a pick using the keyboard

@cesarmarinhorj
Copy link

pikadayOptions: {
onSelect: function(date){
vm.model.myDate = date;
console.log(date);
}
}

@sjordan1975
Copy link
Author

@cesarmarinhorj Hi Cesar. Can you provide more explanation? What am I supposed to do with this information? Where does it go in the code? What is this reference to pikadayOptions? How is it passed/used? Maybe a fiddle would be useful.

Thank you

@icebob icebob closed this as completed Oct 9, 2017
@raphaelarias
Copy link

raphaelarias commented Dec 21, 2017

@cesarmarinhorj Thanks for the snippet. My pikaday input was returning false (!?), with your snippet it works, but it is still a hack (in my case), as it should just work. I have to understand what is happening and fix it properly. So for future references and if someone is having the same problem: my input returns false, and as soon as you select for the first time it returns 1970-01-01, and even though after the second selection it works, the model has the "false" boolean value.

When/if I find the solution I post here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants