Calendar: detect when selected day is clicked

Discussion in 'ASP .Net' started by Ben Amada, Jan 3, 2005.

  1. Ben Amada

    Ben Amada Guest

    Hi,

    I'm using the built-in calendar control. One problem I'm having is that if
    the user clicks on the day in the calendar which is already the
    SelectedDate, a postback occurs, but the SelectionChanged event doesn't
    fire.

    Is there anyway to disable the SelectedDate link so the user can't click on
    it? Or even better, is there a way to detect whether the same day was
    clicked or not? I tried checking the SelectedDate value in the Page_Load
    event, but in the Page_Load event the SelectedDate value hasn't been updated
    yet to the date that was clicked on -- so I can't determine whether the same
    day was clicked on or a different day was clicked on.

    Thanks in advance for any help!
    Ben
    Ben Amada, Jan 3, 2005
    #1
    1. Advertising

  2. Ben Amada

    Ben Amada Guest

    Ben Amada wrote:

    > Or even better, is there a way to detect whether the same day was
    > clicked or not? I tried checking the SelectedDate value in the Page_Load
    > event, but in the Page_Load event the SelectedDate value hasn't been
    > updated yet to the date that was clicked on -- so I can't determine
    > whether the same day was clicked on or a different day was clicked on.


    I found that I can check in Page_PreRender whether or not the same day was
    clicked or not. Problem fixed...

    Thanks,
    Ben
    Ben Amada, Jan 3, 2005
    #2
    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. Andy
    Replies:
    1
    Views:
    701
  2. Replies:
    2
    Views:
    274
  3. Gilles Muys

    Calendar Control: Selected Day Formatting Problem

    Gilles Muys, Dec 26, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    260
    Gilles Muys
    Jan 6, 2004
  4. Parthiv Joshi
    Replies:
    1
    Views:
    658
    Samuel L Matzen
    Jul 6, 2004
  5. Rob Redmon

    Convert day of year to month, day

    Rob Redmon, Apr 4, 2008, in forum: Ruby
    Replies:
    7
    Views:
    297
    Alex Wayne
    Apr 4, 2008
Loading...

Share This Page