Calendar Control........

Discussion in 'ASP .Net Web Controls' started by thomson, Nov 9, 2004.

  1. thomson

    thomson Guest

    Hi,
    When we drag a calendar control, you will be able to see the
    previous and next month dates in the control[iam not talking about the
    header], the dates,
    I need to show only the dates for that particular month, is
    that possible,[Everything is possible], but let me know how is it done

    Thanks in Advance


    Thomson
     
    thomson, Nov 9, 2004
    #1
    1. Advertising

  2. Hi Thomson,

    You just need to use the DayRender event to substitute a space for the date
    if the day falls in a different month. Try this?

    Private Sub Calendar1_DayRender _
    (ByVal sender As Object, _
    ByVal e As System.Web.UI. _
    WebControls.DayRenderEventArgs) _
    Handles Calendar1.DayRender
    ' Ken Cox Nov 9/2004
    ' Substitute a space if the day
    ' belongs to another month
    If e.Day.IsOtherMonth Then
    e.Cell.Text = " "
    End If
    End Sub

    Does this help?

    Ken
    Microsoft MVP [ASP.NET]


    "thomson" <> wrote in message
    news:...
    > Hi,
    > When we drag a calendar control, you will be able to see the
    > previous and next month dates in the control[iam not talking about the
    > header], the dates,
    > I need to show only the dates for that particular month, is
    > that possible,[Everything is possible], but let me know how is it done
    >
    > Thanks in Advance
    >
    >
    > Thomson
     
    Ken Cox [Microsoft MVP], Nov 9, 2004
    #2
    1. Advertising

  3. thomson wrote:
    > When we drag a calendar control, you will be able to see the
    > previous and next month dates in the control[iam not talking about the
    > header], the dates,
    > I need to show only the dates for that particular month, is
    > that possible,[Everything is possible], but let me know how is it done


    Thomson, if I understand you correctly, you want to not show the links
    tot he next and previous month, just the date for the current month,
    correct?

    To do so, simply set the Calendar's ShowNextPrevMonth property to False.
    That's all there is to it.

    Happy Programming!

    --

    Scott Mitchell

    http://www.4GuysFromRolla.com
    http://www.ASPMessageboard.com
    http://www.ASPFAQs.com

    * When you think ASP, think 4GuysFromRolla.com!
     
    Scott Mitchell [MVP], Nov 9, 2004
    #3
  4. Scott Mitchell [MVP], Nov 9, 2004
    #4
  5. thomson

    thomson Guest

    (thomson) wrote in message news:<>...
    > Hi,
    > When we drag a calendar control, you will be able to see the
    > previous and next month dates in the control[iam not talking about the
    > header], the dates,
    > I need to show only the dates for that particular month, is
    > that possible,[Everything is possible], but let me know how is it done
    >
    > Thanks in Advance
    >
    >
    > Thomson


    Thank You Ken, and Scott for your answers? .......i was out of
    touch for few days...was on vacation, Do let you know the results
     
    thomson, Nov 15, 2004
    #5
    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. Natty Gur
    Replies:
    0
    Views:
    886
    Natty Gur
    Nov 10, 2003
  2. Trint Smith
    Replies:
    2
    Views:
    473
    Trint Smith
    Feb 26, 2004
  3. Shevek
    Replies:
    3
    Views:
    6,128
    Shevek
    Jun 23, 2004
  4. Shevek
    Replies:
    0
    Views:
    427
    Shevek
    Jun 23, 2004
  5. Parthiv Joshi
    Replies:
    1
    Views:
    819
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page