Calendar Control

Discussion in 'ASP .Net' started by Peter, Jan 6, 2006.

  1. Peter

    Peter Guest

    Is there anyway to make the System.Web.UI.WebControls.Calendar to display only Month Name and Year, like:

    January, 2006
    February, 2006
    .....
    ....
    ....
    ....



    Thanks


    Peter
    Peter, Jan 6, 2006
    #1
    1. Advertising

  2. Hi Peter,

    Welcome to ASPNET newsgroup.
    As for the question you mentioned, do you means that you only want to
    display the current Year and Month value (as a Label) on the page rather
    than including all the days in the month, yes?

    If so, as for Calendar control, it can not be customized to only display
    year and month, also, Calendar control is a large control which may
    contains large viewstate and html content, so if you want to display a Year
    +Month label, I suggest you consider just use a Label control or create a
    custom control to displaying such info, and we can use the
    System.DateTime.Now to get the current time info....

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)



    --------------------
    | From: "Peter" <>
    | Subject: Calendar Control
    | Date: Thu, 5 Jan 2006 22:32:15 -0600
    | Lines: 57
    | MIME-Version: 1.0
    | Content-Type: multipart/alternative;
    | boundary="----=_NextPart_000_0006_01C61247.E13D8080"
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | Message-ID: <#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | NNTP-Posting-Host: cpe-69-23-74-9.new.res.rr.com 69.23.74.9
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet:368948
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Is there anyway to make the System.Web.UI.WebControls.Calendar to display
    only Month Name and Year, like:
    | January, 2006
    | February, 2006
    | ....
    | ...
    | ...
    | ...
    | Thanks
    | Peter
    |
    Steven Cheng[MSFT], Jan 6, 2006
    #2
    1. Advertising

  3. Peter

    Peter Guest

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi Peter,
    >
    > Welcome to ASPNET newsgroup.
    > As for the question you mentioned, do you means that you only want to
    > display the current Year and Month value (as a Label) on the page rather
    > than including all the days in the month, yes?
    >
    > If so, as for Calendar control, it can not be customized to only display
    > year and month, also, Calendar control is a large control which may
    > contains large viewstate and html content, so if you want to display a
    > Year
    > +Month label, I suggest you consider just use a Label control or create a
    > custom control to displaying such info, and we can use the
    > System.DateTime.Now to get the current time info....
    >
    > Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    >
    > --------------------
    > | From: "Peter" <>
    > | Subject: Calendar Control
    > | Date: Thu, 5 Jan 2006 22:32:15 -0600
    > | Lines: 57
    > | MIME-Version: 1.0
    > | Content-Type: multipart/alternative;
    > | boundary="----=_NextPart_000_0006_01C61247.E13D8080"
    > | X-Priority: 3
    > | X-MSMail-Priority: Normal
    > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    > | Message-ID: <#>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet
    > | NNTP-Posting-Host: cpe-69-23-74-9.new.res.rr.com 69.23.74.9
    > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    > | Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.aspnet:368948
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    > |
    > | Is there anyway to make the System.Web.UI.WebControls.Calendar to
    > display
    > only Month Name and Year, like:
    > | January, 2006
    > | February, 2006
    > | ....
    > | ...
    > | ...
    > | ...
    > | Thanks
    > | Peter
    > |
    >


    Thank you for your help

    I am already using Calendar control to allow user to select dates, but on my
    web page there's an option for user to use approximate date instead of exact
    date, so when user selects approximate I need to display a list of Month /
    Year instead a full calendar, so I though I could use the Calendar control
    for both options. I guess I have to create separate control for the
    approximate option.
    Peter, Jan 6, 2006
    #3
  4. Thank for your response Peter,

    Yes, I agree that use a separate control should be the reasonable approach.
    If there're anything else we can help, please feel free to post here.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | From: "Peter" <>
    | References: <#>
    <>
    | Subject: Re: Calendar Control
    | Date: Fri, 6 Jan 2006 08:25:25 -0600
    | Lines: 73
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | NNTP-Posting-Host: cpe-69-23-74-9.new.res.rr.com 69.23.74.9
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet:369023
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:...
    | > Hi Peter,
    | >
    | > Welcome to ASPNET newsgroup.
    | > As for the question you mentioned, do you means that you only want to
    | > display the current Year and Month value (as a Label) on the page rather
    | > than including all the days in the month, yes?
    | >
    | > If so, as for Calendar control, it can not be customized to only display
    | > year and month, also, Calendar control is a large control which may
    | > contains large viewstate and html content, so if you want to display a
    | > Year
    | > +Month label, I suggest you consider just use a Label control or create
    a
    | > custom control to displaying such info, and we can use the
    | > System.DateTime.Now to get the current time info....
    | >
    | > Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | >
    | >
    | >
    | > --------------------
    | > | From: "Peter" <>
    | > | Subject: Calendar Control
    | > | Date: Thu, 5 Jan 2006 22:32:15 -0600
    | > | Lines: 57
    | > | MIME-Version: 1.0
    | > | Content-Type: multipart/alternative;
    | > | boundary="----=_NextPart_000_0006_01C61247.E13D8080"
    | > | X-Priority: 3
    | > | X-MSMail-Priority: Normal
    | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
    | > | Message-ID: <#>
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | > | NNTP-Posting-Host: cpe-69-23-74-9.new.res.rr.com 69.23.74.9
    | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
    | > | Xref: TK2MSFTNGXA02.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet:368948
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    | > |
    | > | Is there anyway to make the System.Web.UI.WebControls.Calendar to
    | > display
    | > only Month Name and Year, like:
    | > | January, 2006
    | > | February, 2006
    | > | ....
    | > | ...
    | > | ...
    | > | ...
    | > | Thanks
    | > | Peter
    | > |
    | >
    |
    | Thank you for your help
    |
    | I am already using Calendar control to allow user to select dates, but on
    my
    | web page there's an option for user to use approximate date instead of
    exact
    | date, so when user selects approximate I need to display a list of Month
    /
    | Year instead a full calendar, so I though I could use the Calendar
    control
    | for both options. I guess I have to create separate control for the
    | approximate option.
    |
    |
    |
    |
    Steven Cheng[MSFT], Jan 9, 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. Natty Gur
    Replies:
    0
    Views:
    847
    Natty Gur
    Nov 10, 2003
  2. Trint Smith
    Replies:
    2
    Views:
    453
    Trint Smith
    Feb 26, 2004
  3. Shevek
    Replies:
    3
    Views:
    6,027
    Shevek
    Jun 23, 2004
  4. Shevek
    Replies:
    0
    Views:
    380
    Shevek
    Jun 23, 2004
  5. Parthiv Joshi
    Replies:
    1
    Views:
    655
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page