Skip to content

FriendsOfREDAXO/flatpickr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flatpickr for REDAXO

flatpickr is a lightweight and powerful datetime picker.

Howto install

Just install it from the REDAXO installer

Howto use in YForm

{"class": "flatpickr","data-locale":"de","data-enableTime":"true"}

Howto use in Modules

<input type="date" class="form-control flatpickr" data-locale="de" data-enableTime="true" name="REX_INPUT_VALUE[1]" value="REX_VALUE[1]">

Howto RangeField over 2 input fields

{"class": "flatpickr_range","data-locale":"de","data-enableTime":"true", "data-rangefield":"#id"}

Set the view just for date fields.

If you don't want to see the time in a date-field, don't use the timepicker and set an alternative View.

Just set the data-altFormat. 😀

{"class":"flatpickr","data-altFormat":"j. F, Y"}

Disable dates

You can disable dates via a comma seprated list. The attribute ist data-disabled.

Example:

{"class": "flatpickr","data-locale":"de","data-enableTime":"true", "data-disabled":"2022-12-11,2022-12-24,2022-12-25"}

Author

Friends Of REDAXO

Project lead Thomas Skerbis

Vendor https://flatpickr.js.org