techouse / intl-date-time

International DateTime for Laravel Nova
MIT License
57 stars 21 forks source link

Add interface to set defaultHour and defaultMinute #53

Closed kyryl-bogach closed 2 years ago

kyryl-bogach commented 2 years ago

In order to be able to specify the time that is displayed in the time selector, two meta-datas have been added. The default values of the flatpickr.js are 12 for defaultHour and 0 for defaultMinute.

Docs to the two options used for this development: https://flatpickr.js.org/options/

kyryl-bogach commented 2 years ago

Setup:

DateTimeIntl::make('Start at')
    ->defaultHour(6)
    ->defaultMinute(23)

Result:

image


Let me know if I should update the README as well.

techouse commented 2 years ago

Merged and released as v1.6.6.