这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ku1ik
Copy link

@ku1ik ku1ik commented Jan 25, 2013

The code that builds date array takes yyyy || yy but when there's yy present we should add 2000 to it first.

@amsul
Copy link
Owner

amsul commented Jan 28, 2013

Hmm.. I'm not so sure adding "2000" is something we can just assume. This date creation method is used for the value given in the data-value attribute - which is hidden from the user. I'd suggest the developer to just be wiser and use yyyy as the format instead.

@amsul amsul closed this Feb 1, 2013
@amsul amsul reopened this Feb 1, 2013
@ku1ik
Copy link
Author

ku1ik commented Feb 2, 2013

Regardless of what's wise, what's not, according to the docs it should work and I wasted 2 hours troubleshooting it.
If you don't support 'yy' in data-value then please state that in the docs.

@amsul
Copy link
Owner

amsul commented Feb 6, 2013

The yy format is supported the way it should be: displays year as a 2 digit number.

It's just not a good idea to use that format for the hidden value since it's vague and assumptions have to be made. That's the entire purpose of having both format and formatSubmit.

But yes, I agree, this fact should be highlighted in the docs.

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