Daterange Picker (from/until)
Posted: 2019-12-05 07:19
PRO-Tipp for you AppGineers out there:
If you need inputs for a period (from date - to date), just create two datetime-fields in AppGini, then call the following code in hooks/TABLENAME-dv.js:
Code
Output
Check this out. Both inputs will be linked which means for example after you have selected from-date, the to-date-picker is limited to future dates and vice versa.
Please note
https://appgini.bizzworxx.de/products/j ... ge-picker/
Hope you like it!
Best,
Jan
If you need inputs for a period (from date - to date), just create two datetime-fields in AppGini, then call the following code in hooks/TABLENAME-dv.js:
Code
Code: Select all
new AppGiniFields(["valid_from", "valid_to"]).toDatepicker("Valid from/to");
Check this out. Both inputs will be linked which means for example after you have selected from-date, the to-date-picker is limited to future dates and vice versa.
Please note
- Datatype has to be Datetime
- Pass an array of exactly 2 (!) fieldnames to the constructor of AppGiniFields
- Pass a string to the toDatepicker() function. This will be the new label.
- Both pickers will be aligned inline with 50% width
- Your project's date-format should be applied automatically
https://appgini.bizzworxx.de/products/j ... ge-picker/
Hope you like it!
Best,
Jan