Flatpickr: set options after component is initialized

Created on 6 Sep 2016  路  2Comments  路  Source: flatpickr/flatpickr

Hi, I want to set options after the flatpickr instace has been initiated.

In my case, I want to set the max and min date and I need to update the calendar.

Does flatpickr have methods to update the calendar after he is initialized?

Thanks

Most helpful comment

var calendar = new Flatpickr(document.getElementById("flatpickr"));
calendar.config.minDate = new Date();
// or 
calendar.set("minDate", new Date());

Also see Event API

All 2 comments

var calendar = new Flatpickr(document.getElementById("flatpickr"));
calendar.config.minDate = new Date();
// or 
calendar.set("minDate", new Date());

Also see Event API

See https://jsfiddle.net/d4mcnxqh/ for a fiddle.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

719media picture 719media  路  3Comments

mgohin picture mgohin  路  4Comments

Spoki4 picture Spoki4  路  3Comments

pimskie picture pimskie  路  3Comments

T-Hugs picture T-Hugs  路  3Comments