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

Comments

Projects
None yet
2 participants
@rroesler

rroesler commented Jun 25, 2010

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

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Jul 22, 2010

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 :)

Contributor

tipiirai commented Jul 22, 2010

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

This comment has been minimized.

Show comment
Hide comment
@rroesler

rroesler 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 ?

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

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Aug 15, 2010

Contributor

this is now fixed. here is the commit:

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

now min = 0 is taken into account

Contributor

tipiirai commented Aug 15, 2010

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