locked
Why nothing is display when i selecting today date in Calendar RRS feed

  • Question

  • Hi, all...

    Please help if anyone knows..

    Why nothing is display when i selecting today date in Calendar?

    Others date is function well...


    TQ.. 
    Wednesday, November 5, 2008 10:15 AM

Answers

  • No Idea What is happening, but if you want today's date when from is loaded then you have to set it manually somewhere, here is an exmple:

    In form load event

     

    private void Form1_Load(object sender, EventArgs e)

    {

    textBox1.Text = DateTime.Today.ToShortDateString();

    }

    And in datechanged event

    private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)

    {

    textBox1.Text = e.Start.Date.ToShortDateString();

    }


    Arjun Paudel
    Thursday, November 6, 2008 4:29 AM

All replies

  • Can you give us a little more detail?
    Pete Mourfield - www.mourfield.com
    Wednesday, November 5, 2008 2:00 PM
  • You looking for another pop up window when clicking on date?
    Wednesday, November 5, 2008 9:12 PM
  • Okay..


    I have an Calendar control for my page...
    I want the date selected by the user to display in a textbox field, exp: 21/9/2008...

    All the date selected can be displayed well in the textbox,
    except for the today's date which cant be displayed in textbox..

    Is anything i wrongly set or do i need set something?


    Thursday, November 6, 2008 4:14 AM
  • No Idea What is happening, but if you want today's date when from is loaded then you have to set it manually somewhere, here is an exmple:

    In form load event

     

    private void Form1_Load(object sender, EventArgs e)

    {

    textBox1.Text = DateTime.Today.ToShortDateString();

    }

    And in datechanged event

    private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)

    {

    textBox1.Text = e.Start.Date.ToShortDateString();

    }


    Arjun Paudel
    Thursday, November 6, 2008 4:29 AM