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

[Dateinput] not handling initialization when yearRange[x] == 0 #94

Closed
rroesler opened this issue Jun 25, 2010 · 3 comments
Closed

[Dateinput] not handling initialization when yearRange[x] == 0 #94

rroesler opened this issue Jun 25, 2010 · 3 comments

Comments

@rroesler
Copy link

fix:

    // make sure value, min & max has values        
    value = parseDate(value) || now;
    min   = parseDate(min || conf.yearRange[0] * 365) || now;
    max   = parseDate(max || conf.yearRange[1] * 365) || now;
@tipiirai
Copy link
Contributor

this forces min and max always having a value which is not always a desired situation. I guess the bug here is on the code comment :)

@rroesler
Copy link
Author

rroesler commented Aug 5, 2010

True .. perhaps I should have checked for min,max,yearRange being undefined (or not).

In my case I wanted a yearRange of [-100,0] for entering birth dates. But the zero was being taken as undefined rather that zero.

Also, I could not see why setting min and max would not have the same effect as setting the year range.

Aside, in the validator .. min and max on dates is ignored. Is that correct ?

@tipiirai
Copy link
Contributor

this is now fixed. here is the commit:

http://github.com/jquerytools/jquerytools/commit/1a261079917d94874948ab39350120135cd3f8a3

now min = 0 is taken into account

This issue was closed.
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

2 participants