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?
Solved! Go to Solution.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
did you tried adding an hidden variable @TypeHint of type date?
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Views
Likes
Replies