Flatpickr: No way to set a default time

Created on 3 Oct 2016  路  3Comments  路  Source: flatpickr/flatpickr

Expected Behavior

If time is enabled, I expect defaultDate to also set the default time.

Current Behavior

See this jsfiddle.

Context

I'm building an app that allows users to schedule certain tasks. 7:00 PM is the most common time that something would be scheduled, so I would like the datetime picker to default to 7:00 PM.

Most helpful comment

@delmotte You can do so like this:

        flatpickr(".flatpickr", {
            enableTime: true,
            defaultHour: 10,
            defaultMinute: 23, 
        });

All 3 comments

Thanks for the fast turnaround!

not working for me ... How did you fix it ?

@delmotte You can do so like this:

        flatpickr(".flatpickr", {
            enableTime: true,
            defaultHour: 10,
            defaultMinute: 23, 
        });
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mchaves-ciandt picture mchaves-ciandt  路  3Comments

ibarral picture ibarral  路  3Comments

ankur-pandey7 picture ankur-pandey7  路  3Comments

Spoki4 picture Spoki4  路  3Comments

719media picture 719media  路  3Comments