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?
redblue
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?
This discussion has been closed.
Answers
Documentation on the datetime field type is here:
https://editor.datatables.net/reference/field/datetime
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.
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