Flatpickr: dateFormat

Created on 12 Jul 2016  Â·  4Comments  Â·  Source: flatpickr/flatpickr

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

Most helpful comment

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

All 4 comments

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(…)

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

fixed

Nice, do you plan a release soon ?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

719media picture 719media  Â·  3Comments

titiyoyo picture titiyoyo  Â·  3Comments

pimskie picture pimskie  Â·  3Comments

PierreGirbau picture PierreGirbau  Â·  3Comments

bedakb picture bedakb  Â·  3Comments