Timefield in touch ui | Community
Skip to main content
manisha594391
Level 4
Apr 18, 2018 7:41 AM UTC

Timefield in touch ui

I want to create a timefield in touch ui dialog.

I can do it in classic ui using xtype="timefield".

Please suggest how can this output be returned in touch ui dialog

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

akhoury
Employee
May 17, 2018 11:26 PM UTC

Additional note, some discussion around use of the Touch UI date/time picker can be found here: AEM 6.1 Touch UI: Datepicker Field not prepopulated with stored value

Translate
Tyler_Maynard
Level 4
May 17, 2018 9:46 PM UTC

You can use the type property of the DatePicker Touch UI component to "time" to only use hours and minutes.

DatePicker — Granite UI 1.0 documentation

But, depending on what your goal you might run into issues - as this stores the property as a date and not a string, as the timefield does. This could cause issues if your trying to use both dialogs while moving authors over to touch ui. Then you would need to follow Scott's advice and create a custom Touch UI Granite Component.

Translate
smacdonald2008
Level 10
Apr 18, 2018 1:03 PM UTC

With Touch UI - you can write a custom resource type to meet you needs (if the ootb ones do not meet your needs) -- see this where we use a Color picker as an example -- Adobe Experience Manager Help | Creating a custom Experience Manager sling:resourceType for Touch UI

Translate
Hemant_arora
Level 8
Apr 18, 2018 11:03 AM UTC

You will have to write a custom timepicker for that. There is no out of the box timepicker available in touch ui

Translate
Hemant_arora
Level 8
Apr 18, 2018 9:46 AM UTC

Do you just need timefield and not the complete datetime xtype ?

Otherwise,

Use the dialog converter tool to convert your dialog field.

download and install DCT from the link below.

Dialog Conversion Tool

This should be the resourceType in touch UI

granite/ui/components/coral/foundation/form/datepicker

Translate
manisha594391
Level 4
Apr 18, 2018 10:08 AM UTC

I already tried datepicker, but it gives the date field.

But for my requirement I need only timefield.

Translate
premchandp63244
New Participant
May 7, 2020 8:18 PM UTC

Hi @manisha594391 

Have you found any solution for this as we have same requirement.

 

Thanks in advance. 

Translate