How to create a scaffold with a DatePicker? | Community
Skip to main content
AEMing
New Participant
October 16, 2015
Solved

How to create a scaffold with a DatePicker?

  • October 16, 2015
  • 3 replies
  • 1210 views

I'm defining the structure of the page that my scaffold will create, but I'm failing to see how I can add a DatePicker in the Dialog Editor. I would have expected a Date(Time)Picker in the Fields grouping but no. So, how do I add a DatePicker to my scaffold?

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

This may be a bit late...but I'll give an answer anyway.

For that particular field, you need to set the xtype property to "datetime" as opposed to "textfield" for a traditional text field.  You will probably also want to add an additional property to that node to avoid the time appearing in the field when you select a date.  Here is the info for that property:

Name:  hideTime

Type:  String

Value: true

Hope that helps!

3 replies

smacdonald2008
New Participant
October 16, 2015

In am not sure - do you want the datepicker in a scaffolding dialog or on the web page so end users can use a datepicker to choose a date value? I am assuming the scaffolding dialog.

Here are the docs https://docs.adobe.com/docs/en/cq/5-6-1/wcm/scaffolding.html

Note in the docs the difference between a component dialog and a scaffolding dialog:

The dialog definition for a scaffold works similarly to that of a component (see Components). However a few important differences apply:

  • Component dialog definitions are rendered as normal dialog boxes (as shown in the middle pane of the dialog editor, for example) while scaffold dialog definitions, though they appear as normal dialog boxes in the dialog editor, are rendered on the scaffold page as a scaffold form (as shown in the News scaffold above).
  • Component dialogs provide fields for only those values needed to define the content of a single specific component. A scaffold dialog must provide fields for every property in every paragraph of the page to be created.
  • In the case of component dialogs, the component used to render the specified content is implicit and therefore thesling:resourceType property of the paragraph is filled in automatically when the paragraph is created. With a scaffold all the information defining both the content and the assigned component for a given paragraph must be provided by the dialog itself. In scaffold dialogs this information must be provided by using Hidden fields to submit this information on page creation.
AEMing
AEMingAuthor
New Participant
October 16, 2015

smacdonald2008 wrote...

In am not sure - do you want the datepicker in a scaffolding dialog or on the web page so end users can use a datepicker to choose a date value? I am assuming the scaffolding dialog.

Here are the docs https://docs.adobe.com/docs/en/cq/5-6-1/wcm/scaffolding.html

Yes, I want a DatePicker in the scaffolding dialog. I've read the above documentation thoroughly and looked at the included demo sites (geometrix) without finding an example of how to include a DatePicker. So, how to do it?

ken_king1
ken_king1Accepted solution
New Participant
October 16, 2015

This may be a bit late...but I'll give an answer anyway.

For that particular field, you need to set the xtype property to "datetime" as opposed to "textfield" for a traditional text field.  You will probably also want to add an additional property to that node to avoid the time appearing in the field when you select a date.  Here is the info for that property:

Name:  hideTime

Type:  String

Value: true

Hope that helps!