Inherit from umbraco.editorControls.datepicker.DateDataType, override the Id property and put your own GUID in there (otherwise you'll have 2 data types with the same Id and Umbraco wont be happy), and then set in the constructor the default value in the Value property of the Data property on the DateDataType class (ie - set it if there's nothing in the Value property).
Extending Date Control
Hi
Is there any way to extend the current date control?
Regards,
Hi Nami
How would you like to extend it?
/Jan
Hi
I would like to add it default value. For example, I would like to put current date time as its default value.
(I do not want to use default value package provided in umbraco web site)
Nami
Inherit from umbraco.editorControls.datepicker.DateDataType, override the Id property and put your own GUID in there (otherwise you'll have 2 data types with the same Id and Umbraco wont be happy), and then set in the constructor the default value in the Value property of the Data property on the DateDataType class (ie - set it if there's nothing in the Value property).
That should do it
is working on a reply...