Datepicker from Granite Foundation - How do you change the property type to Date instead of String | Adobe Higher Education
Skip to main content
October 16, 2015
Besvarat

Datepicker from Granite Foundation - How do you change the property type to Date instead of String

  • October 16, 2015
  • 2 svar
  • 741 visningar

I am using the datepicker component (granite/ui/components/foundation/form/datepicker) for a new field in the Touch UI, but it saves it as a String property in the node, rather than a Date.  We do querybuilder searches with Dates, and it doesn't seem to work when that field is a String, but it works as a date.

How do I change it so that this component saves this value with type Date rather than String?

Det här ämnet har stängts för svar.
Bästa svar av smacdonald2008

Another option that you can do is to take the String returned from the component and convert the value to a Date via JavaScript. See: 

http://www.mattkruse.com/javascript/date/

Then you can assign that Date value to the JCR node.  

2 svar

smacdonald2008
Level 10
October 16, 2015

Another option that you can do is to take the String returned from the component and convert the value to a Date via JavaScript. See: 

http://www.mattkruse.com/javascript/date/

Then you can assign that Date value to the JCR node.  

Sham_HC
Level 10
October 16, 2015

did you tried adding an hidden variable @TypeHint of type date?