How to make a DateTime picker with time picking?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Wolf
User
Posts: 79

How to make a DateTime picker with time picking?

Post by Wolf »

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.


arbei
User
Posts: 9401

Post by arbei »

You may simply use the DateTime picker extension and enable "Use date/timer picker" for the field in Edit Tag settings.


Wolf
User
Posts: 79

Post by Wolf »

all enabled but no time picking.


arbei
User
Posts: 9401

Post by arbei »

  1. 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.
  2. 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.
  3. 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:

Wolf
User
Posts: 79

Post by Wolf »

didn't work for me


arbei
User
Posts: 9401

Post by arbei »

  1. 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 and clock parts.
  2. Read the docs for the correct format of the options.
  3. As the readme says: Options - Options applies to all fields (JSON syntax)

Wolf
User
Posts: 79

Post by Wolf »

options:
display: { sideBySide: true, components: { clock: true }}, localization: { startOfTheWeek: 1 }

all good

if i paste to Extesions -> Date/Time Picker -> Advanced -> Fields - Options in Reqired field
didn't work


mobhar
User
Posts: 11745

Post by mobhar »

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.


Wolf
User
Posts: 79

Post by Wolf »

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 } }?


mobhar
User
Posts: 11745

Post by mobhar »

You should refer to its documentation: Localization Options - Tempus Dominus.


Post Reply