I am wondering if its possible to put the current date as standarad value in a date picker control. I tried to input $date$ in the textbox of the date picker, but it doesn't work because its not a value date format. Thank you.
I recently changed my language file (en.xml) from en-GB culture to en-US. This causes my standard value for date pickers to fail. Today's date is no longer selected/inserted. I have been trying various formats with no luck. Anyone figure this one out?
Agreed; the only thing I need Standard Values package for is to add today's date as a default date, yet even in 1.6 it's not clear how to do this. Quick multi-screen-shot documentation possible?
If it is not working for you and you are not sure about the format, the best/quickest way to troubleshoot is to get the source and put a breakpoint at /BusinessLogic/StandardValue.cs > SetDocumentProperties() method. You can then check what your Key is traslated to by the Date Picker field, and what your value is converted to.
Standard Values for "Today" for Date Picker
Hi,
I am wondering if its possible to put the current date as standarad value in a date picker control. I tried to input $date$ in the textbox of the date picker, but it doesn't work because its not a value date format. Thank you.
Hi Patrick,
DatePicker is currently not supported, but will added in the next update.
- Morten
I've gotten a work around, i entered 1900-01-01 in the standard value of a date picker field, then in the StandardValue.config, put the below line:
<key name="01/01/1900 00:00:00" type="date">yyyy-MM-dd</key>
And it works perfectly now.
Thanks Patrick. Works perfect!
I recently changed my language file (en.xml) from en-GB culture to en-US. This causes my standard value for date pickers to fail. Today's date is no longer selected/inserted. I have been trying various formats with no luck. Anyone figure this one out?
"DatePicker is currently not supported, but will added in the next update."
I'm not seeing this as being fixed in the latest version. Was it?
I would like this too but can't see it in v1.6.
Agreed; the only thing I need Standard Values package for is to add today's date as a default date, yet even in 1.6 it's not clear how to do this. Quick multi-screen-shot documentation possible?
Add this to the StandardValue.config and it should work.
<key name="1900/01/01 00:00:00" type="date">yyyy-MM-dd</key>
Depending on your DateTime format setup (in SQL Server as well), the key name/value format will need to match. The following worked for me:
If it is not working for you and you are not sure about the format, the best/quickest way to troubleshoot is to get the source and put a breakpoint at /BusinessLogic/StandardValue.cs > SetDocumentProperties() method. You can then check what your Key is traslated to by the Date Picker field, and what your value is converted to.
This was tested with Umbraco 4.11.10
is working on a reply...