Copied to clipboard

Flag this post as spam?

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


  • Patrick 10 posts 33 karma points
    Feb 17, 2011 @ 05:04
    Patrick
    0

    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.

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 18, 2011 @ 10:30
    Morten Christensen
    0

    Hi Patrick,

    DatePicker is currently not supported, but will added in the next update.

    - Morten

  • Patrick 10 posts 33 karma points
    Mar 10, 2011 @ 04:28
    Patrick
    3

    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.

  • Johan 188 posts 380 karma points
    Nov 03, 2011 @ 16:34
    Johan
    0

    Thanks Patrick. Works perfect!

  • Connie DeCinko 931 posts 1160 karma points
    Dec 21, 2012 @ 17:25
    Connie DeCinko
    0

    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?

     

  • Connie DeCinko 931 posts 1160 karma points
    Dec 21, 2012 @ 19:44
    Connie DeCinko
    0

    "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?

     

  • Matt Taylor 873 posts 2086 karma points
    Mar 28, 2013 @ 14:43
    Matt Taylor
    0

    I would like this too but can't see it in v1.6.

  • Eric Schrepel 161 posts 226 karma points
    Apr 22, 2013 @ 19:47
    Eric Schrepel
    0

    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?

  • Matt Taylor 873 posts 2086 karma points
    Apr 23, 2013 @ 10:31
    Matt Taylor
    0

    Add this to the StandardValue.config and it should work.

    <key name="1900/01/01 00:00:00" type="date">yyyy-MM-dd</key>

  • Sudeep 1 post 21 karma points
    Sep 16, 2013 @ 05:36
    Sudeep
    0

    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:

    <key name="01/01/1900 00:00:00" type="date">yyyy-dd-MM</key>
    

    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

Please Sign in or register to post replies

Write your reply to:

Draft