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] initial date via value attribute not picking up #38

Closed
thedotedge opened this issue May 12, 2010 · 4 comments
Closed

[Dateinput] initial date via value attribute not picking up #38

thedotedge opened this issue May 12, 2010 · 4 comments

Comments

@thedotedge
Copy link

The HTML code for the input is:

The JS is:

$().ready(function() {
    $('input[name="birth_date"]').dateinput({
        format: 'dd/mm/yyyy',
        firstDay: 1,
        speed: 'fast',
        selectors: false
    });
});

The expected outcome is that calendar would have 25/11/1981 as current, but it ignores the value attribute and has today as current date: http://grab.by/4kyi

Firefox 3.5.6

@tipiirai
Copy link
Contributor

the value is not in a valid format. you should write

value="1981-11-25"

if you want to show a human readable value put the real value to

data-value="1981-11-25"

and the value attribute to ahything you like.

@thedotedge
Copy link
Author

date-value is nice, but not always trivial to use when you use HTML form handling frameworks.
Anyway, I've tried to change the format and it seems to be better, but still the year is 100 off: value="1967-05-30" produces May 2067 in the Dateinput.

@tipiirai
Copy link
Contributor

this bug is fixed on the latest release here on github and will be published on v1.2.2

@thedotedge
Copy link
Author

Thanks!

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