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

Conversation

@psorowka
Copy link

@psorowka psorowka commented Apr 4, 2014

  1. removed invalid character in line 581
  2. changed determination of 'fromValue' flag on init.

When having a node like this:

 <input value="2014-04-10" data-value="2014-04-10" />

And initializing pickadate like:

 $("input").pickadate( {formatSubmit: "yyyy-mm-dd"});

The expected behaviour is to set the date to April 10, 2014.

The previous implementation took the value from data-value but determined the fromValue flag by evaluating !!elementValue. This means, as long as value-attribute is set, the data-value attribute is treated with zero-based month-index, so the date would be set to March 10, 2014.

1. removed invalid character in line 581
2. changed determination of 'fromValue' flag on init.

When having a node like this:

     <input value="2014-04-10" data-value="2014-04-10" />

And initializing pickadate like: 

     $("input").pickadate( {formatSubmit: "yyyy-mm-dd"});

The *expected* behaviour is to set the date to April 10, 2014. 

The previous implementation took the value from data-value but determined the fromValue flag by evaluating !!elementValue. This means, as long as value-attribute is set, the data-value attribute is treated with zero-based month-index, so the date would be set to March 10, 2014.
@amsul amsul added the todo label Apr 12, 2014
@amsul amsul added this to the v3.4.1 milestone Apr 12, 2014
@amsul
Copy link
Owner

amsul commented Apr 12, 2014

Thanks for the fix..Closing this in favor of #358 as that fixes it in an alternate way.

Cheers!

@amsul amsul closed this Apr 12, 2014
@amsul amsul added solved and removed todo labels Apr 12, 2014
@amsul amsul removed this from the v3.4.1 milestone Apr 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants