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

dateFormat #172

Closed
mgohin opened this issue Jul 12, 2016 · 4 comments
Closed

dateFormat #172

mgohin opened this issue Jul 12, 2016 · 4 comments

Comments

@mgohin
Copy link

mgohin commented Jul 12, 2016

Very nice datetimepicker, love it.
But there is a problem with the dateFormat.

<input type="text" id="test" value="03-08-1986">
flatpickr('#test', {dateFormat: 'd-m-Y'});

The calendar is displaying the date as 8 March instead of 3 August

@mgohin
Copy link
Author

mgohin commented Jul 12, 2016

I investigated a bit and found like a solution, but buggy. The parsing date function doesn't take template so I have to parse the date myself.
I can use parseDate option, but your lib is changing my function to a boolean because of parseConfig:226

if (typeof self.defaultConfig[option] === "boolean") {
    configValue = String(configValue) !== "false";
}

So I'm getting this error : flatpickr.min.js:1133 TypeError: self.config.parseDate is not a function(…)

@chmln
Copy link
Member

chmln commented Jul 12, 2016

I can use parseDate option, but your lib is changing my function to a boolean because of parseConfig:226

fixed

@mgohin
Copy link
Author

mgohin commented Jul 12, 2016

Nice, do you plan a release soon ?

@chmln
Copy link
Member

chmln commented Jul 12, 2016

Of course. No ETAs, however.
if you want, you can use the latest version in the meantime

@chmln chmln closed this as completed Jul 12, 2016
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