DotNet2.0 Calendar SelectedDate

Discussion in 'ASP .Net' started by Steven Nagy, Dec 8, 2006.

  1. Steven Nagy

    Steven Nagy Guest

    Hey all,

    On page load I am setting the selected date to DateTime.Now but its not
    appearing as selected when the page loads. I have set the selection
    mode to CalendarSelectionMode.Day since the user should only be able to
    select one date. I've also set VisibleDate to DateTime.Now

    No love from my calendars though. On a post back it is detecting that
    today is selected, but it just won't show that visually on form load.

    Any ideas?

    Thanks,
    Steven
    Steven Nagy, Dec 8, 2006
    #1
    1. Advertising

  2. Steven Nagy

    Mark Rae Guest

    "Steven Nagy" <> wrote in message
    news:...

    > No love from my calendars though. On a post back it is detecting that
    > today is selected, but it just won't show that visually on form load.
    >
    > Any ideas?


    Well, what happens differently on post back...?
    Mark Rae, Dec 8, 2006
    #2
    1. Advertising

  3. What happens if you set SelectedDate and VisibleDate in the Init event? The
    Init event happens earlier than Load, and it is the event where setting
    values that are not determined by postback values are usually set.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Steven Nagy" <> wrote in message
    news:...
    > Hey all,
    >
    > On page load I am setting the selected date to DateTime.Now but its not
    > appearing as selected when the page loads. I have set the selection
    > mode to CalendarSelectionMode.Day since the user should only be able to
    > select one date. I've also set VisibleDate to DateTime.Now
    >
    > No love from my calendars though. On a post back it is detecting that
    > today is selected, but it just won't show that visually on form load.
    >
    > Any ideas?
    >
    > Thanks,
    > Steven
    >
    Nathan Sokalski, Dec 10, 2006
    #3
  4. Steven Nagy

    Steven Nagy Guest

    That solved it Nathan.
    Although I thought the only stuff to go in Init would be pre-viewstate
    stuff (like setting up datagrid columns, etc). I thought that anything
    like this would actually go into PreRender but it wasn't working there
    either.

    Thanks team!
    Steven Nagy, Dec 13, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis Esteban Valencia
    Replies:
    0
    Views:
    666
    Luis Esteban Valencia
    Jan 17, 2005
  2. 00_CuMPe3WaR3D12

    Calendar Control - SelectedDate problem

    00_CuMPe3WaR3D12, Feb 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,527
    ihtesham
    Jun 15, 2009
  3. Xarky

    Calendar.SelectedDate

    Xarky, Apr 7, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    6,376
    xarky d_best
    Apr 7, 2005
  4. K B
    Replies:
    1
    Views:
    4,089
    S. Justin Gengo
    Apr 24, 2006
  5. Jason James
    Replies:
    2
    Views:
    572
    Jason James
    Jul 2, 2006
Loading...

Share This Page