Menu

default date value

Help
Anonymous
2012-04-19
2012-09-19
  • Anonymous

    Anonymous - 2012-04-19

    How do I show date defaulted to today date? I am using ASP.NET and I set
    DateInput1.Text = DateTime.Today.ToShortDateString().

    But it's only show today date if you click for calendar.

     
  • Anonymous

    Anonymous - 2012-04-19

    I also set PlaceHolderText to today date, still no effect

     
  • Jason Akin

    Jason Akin - 2012-04-19

    I think this behavior is the browser implementation. In desktop IE and
    Firefox, it appears fine when the page loads, but you can't drop down a
    calendar. If you check out w3schools you can experiment with "raw" html5 and
    see the same behavior. You can type in the date value="04/19/2012". I don't
    think I can do anything to change it, but I'll keep looking.

     
  • j0hill

    j0hill - 2012-04-27

    the date should be in the following format "yyyy-MM-dd" in order for it to
    default correctly

     
  • Jason Akin

    Jason Akin - 2012-04-30

    I have modified the source, DLL, and Install package to make sure that the
    Date controls render the value as j0hill pointed out. Thank you!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.