Skip to content
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

Date with min and max rules #459

Merged
merged 2 commits into from
Nov 12, 2014
Merged

Conversation

zzapal
Copy link
Contributor

@zzapal zzapal commented Oct 23, 2014

min and max comparison currently does not support Date using following code:

var d = ko.observable(new Date(2012, 03, 04)).extend({ min: new Date(2010, 02, 02) });

because it was clearly written with HTML's input in mind where all values are passed as strings. Above code currently is always not valid.

We use special binding which translates value to/from date (with conjunction with jquery datepicker) so that in js we always deal with date.

crissdev added a commit that referenced this pull request Nov 12, 2014
min and max rules now works with Date observables
@crissdev crissdev merged commit dc6fa9c into Knockout-Contrib:master Nov 12, 2014
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