How to use the same time picker as the editor elsewhere in the page?

How to use the same time picker as the editor elsewhere in the page?

redblueredblue Posts: 5Questions: 2Answers: 0

Hi,

I've got the following set up in my editor:

         {name: "StartTime", type: "datetime", format: "HH:mm:ss",label: "Start Time"},
         {name: "EndTime", type: "datetime", format: "HH:mm:ss",label: "End Time"},

And it works well and as expected. However, on the same page I have other time controls and I need to have the same UI interaction as the editor. Is there a way to do this? Is the editor using a jquery control/widget?

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Documentation on the datetime field type is here:
    https://editor.datatables.net/reference/field/datetime

  • rduncecbrduncecb Posts: 125Questions: 2Answers: 28

    AFAIK, the datetime picker used by the datetime field type is an integral part of Editor and is not designed to be used outside of Editor.

  • allanallan Posts: 63,480Questions: 1Answers: 10,467 Site admin

    I'm afraid @rduncecb is correct. The date / time picker in Editor is internal to Editor. I'm probably going to spin it off into its own little library at some point - but it is useful to not have any dependencies in Editor (other than DataTables and jQuery of course).

    I took a lot of the styling insperation for the Editor calendar from Pikaday as I think it is beautiful: https://github.com/dbushell/Pikaday .

    Allan

This discussion has been closed.