Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nami Nasserazad 23 posts 43 karma points
    Dec 31, 2010 @ 12:43
    Nami Nasserazad
    0

    Extending Date Control

    Hi

    Is there any way to extend the current date control?

    Regards,

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Dec 31, 2010 @ 12:48
    Jan Skovgaard
    0

    Hi Nami

    How would you like to extend it?

    /Jan

  • Nami Nasserazad 23 posts 43 karma points
    Dec 31, 2010 @ 12:53
    Nami Nasserazad
    0

    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

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 01, 2011 @ 13:11
    Aaron Powell
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft