Skip to content

fix splitDateTime for plain datepicker #452

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

Merged
merged 2 commits into from
Sep 20, 2012

Conversation

NetForce1
Copy link
Contributor

Pull request for dev this time, instead of master.

When using a plain datepicker, getDate returns always the current date because splitDateTime puts the date in the time part of the result.
This change only splits when the input actually contains a time.

When using a plain datepicker, getDate returns always the current date because splitDateTime puts the date in the time part of the result.
This change only splits when the input actually contains a time.
When the dateFormat contains the separator that is used to split date and time, parseDate fails.
Also, since parseDate has no access to the instance, it does not know the correct timeFormat, so splitting is not always correct. 
Restoring the old hack of relying on datepickers error message seems to fix these issues.
trentrichardson added a commit that referenced this pull request Sep 20, 2012
fix splitDateTime for plain datepicker
@trentrichardson trentrichardson merged commit 670983c into trentrichardson:dev Sep 20, 2012
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

Successfully merging this pull request may close these issues.

2 participants