Is it possible to make a DateTime picker the same way as in fullcalendar with time picking?
I need a regular DateTime field in a table. Not in report Calendar.
I saw that it works in Calendar, I want to clarify how to add it in a regular table.
How to make a DateTime picker with time picking?
-
- User
- Posts: 79
How to make a DateTime picker with time picking?
-
- User
- Posts: 9419
- The "Date/Time Picker" (select date or date/time) is shipped with PHPMaker. If you meant the "Time Picker" (select time only), it is an additonal extension for registered users only.
- If the specified Date/Time Format (under View Tag) of the field has no time part (you better use "DateTime" instead of "Default"), the Date/Time Picker will not show the time part.
- If you meant the
sideBySide
mode as in Calendar report, you need to add your options to the advanced setting "Options" of the Date/Time picker extension for the field with, e.g.{ sideBySide: true, components: { clock: true }}
. Also see:- Date/Time Picker Options
- Using Extensions
-
- User
- Posts: 9419
- Don't just copy and paste above example, you need to modify it to make it complete and valid, above example only shows the required
sideBySide
andclock
parts. - Read the docs for the correct format of the options.
- As the readme says: Options - Options applies to all fields (JSON syntax)
-
- User
- Posts: 11749
Change this code:
display: { sideBySide: true, components: { clock: true }}, localization: { startOfTheWeek: 1 }
to:
{ display: { sideBySide: true, components: { clock: true } }, localization: { startOfTheWeek: 1 } }
In addition, make sure you have already chosen DateTime from Fields setup -> View Tag pane -> Format = Date/Time -> Date/Time format, after that, re-generate ALL the script files again.
-
- User
- Posts: 79
Thanks a lot!
the problem was in the DateTime format, View Tag which was selected as Default
let's try to solve another problem? I have a multilingual project en_US and ru_RU.
{ localization: { startOfTheWeek: 1 } }
This setting affects both languages at once.
How to make the parameter in en_US be { localization: { startOfTheWeek: 0 } }
?
-
- User
- Posts: 11749
You should refer to its documentation: Localization Options - Tempus Dominus.