Date Time Picker

Discussion in 'ASP .Net' started by Charles A. Lackman, Nov 24, 2004.

  1. Hello,

    I have a DateTimePicker on my form and I need to make every Even week Red
    and every Odd week Yellow.

    Any Suggestions will be greatly appreciated (Detailed help is even more
    appreciated).

    Thanks,

    Chuck
     
    Charles A. Lackman, Nov 24, 2004
    #1
    1. Advertising

  2. Hi Chuck,

    Are you talking about the Calendar server control that comes with ASP.Net?
    If so, I don't see any properties on it that let you do that. So in order
    to make it happen you need to override the Render event for that control and
    modify the output from there. The easiest way would be to set the color of
    the day to some odd value. Then in the render event find where that value
    is and set it's color alternating by 7s. If this is a control you created
    then the easiest way would be to alternate the value of the color everytime
    you start a new row. If you aren't using the Calendar control could you
    post some code to see what you are doing. I'm not sure how to answer this
    question. Good luck! Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.

    "Charles A. Lackman" <> wrote in message
    news:...
    > Hello,
    >
    > I have a DateTimePicker on my form and I need to make every Even week Red
    > and every Odd week Yellow.
    >
    > Any Suggestions will be greatly appreciated (Detailed help is even more
    > appreciated).
    >
    > Thanks,
    >
    > Chuck
    >
    >
     
    Ken Dopierala Jr., Nov 24, 2004
    #2
    1. Advertising

  3. Charles A. Lackman

    Chuck Guest

    Hello And Thanks,

    I am using a Windows Forms DateTimePicker.. ??

    Chuck

    "Ken Dopierala Jr." <> wrote in message
    news:...
    > Hi Chuck,
    >
    > Are you talking about the Calendar server control that comes with ASP.Net?
    > If so, I don't see any properties on it that let you do that. So in order
    > to make it happen you need to override the Render event for that control
    > and
    > modify the output from there. The easiest way would be to set the color
    > of
    > the day to some odd value. Then in the render event find where that value
    > is and set it's color alternating by 7s. If this is a control you created
    > then the easiest way would be to alternate the value of the color
    > everytime
    > you start a new row. If you aren't using the Calendar control could you
    > post some code to see what you are doing. I'm not sure how to answer this
    > question. Good luck! Ken.
    >
    > --
    > Ken Dopierala Jr.
    > For great ASP.Net web hosting try:
    > http://www.webhost4life.com/default.asp?refid=Spinlight
    > If you sign up under me and need help, email me.
    >
    > "Charles A. Lackman" <> wrote in message
    > news:...
    >> Hello,
    >>
    >> I have a DateTimePicker on my form and I need to make every Even week Red
    >> and every Odd week Yellow.
    >>
    >> Any Suggestions will be greatly appreciated (Detailed help is even more
    >> appreciated).
    >>
    >> Thanks,
    >>
    >> Chuck
    >>
    >>

    >
    >
     
    Chuck, Nov 24, 2004
    #3
  4. Hi Chuck,

    Sorry! I forgot what forum I was in. I was thinking ASP.Net all the way
    and didn't realize this was the general forum. Hopefully someone will
    provide you with the correct answer soon. Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.

    "Chuck" <> wrote in message
    news:...
    > Hello And Thanks,
    >
    > I am using a Windows Forms DateTimePicker.. ??
    >
    > Chuck
    >
    > "Ken Dopierala Jr." <> wrote in message
    > news:...
    > > Hi Chuck,
    > >
    > > Are you talking about the Calendar server control that comes with

    ASP.Net?
    > > If so, I don't see any properties on it that let you do that. So in

    order
    > > to make it happen you need to override the Render event for that control
    > > and
    > > modify the output from there. The easiest way would be to set the color
    > > of
    > > the day to some odd value. Then in the render event find where that

    value
    > > is and set it's color alternating by 7s. If this is a control you

    created
    > > then the easiest way would be to alternate the value of the color
    > > everytime
    > > you start a new row. If you aren't using the Calendar control could you
    > > post some code to see what you are doing. I'm not sure how to answer

    this
    > > question. Good luck! Ken.
    > >
    > > --
    > > Ken Dopierala Jr.
    > > For great ASP.Net web hosting try:
    > > http://www.webhost4life.com/default.asp?refid=Spinlight
    > > If you sign up under me and need help, email me.
    > >
    > > "Charles A. Lackman" <> wrote in message
    > > news:...
    > >> Hello,
    > >>
    > >> I have a DateTimePicker on my form and I need to make every Even week

    Red
    > >> and every Odd week Yellow.
    > >>
    > >> Any Suggestions will be greatly appreciated (Detailed help is even more
    > >> appreciated).
    > >>
    > >> Thanks,
    > >>
    > >> Chuck
    > >>
    > >>

    > >
    > >

    >
    >
     
    Ken Dopierala Jr., Nov 24, 2004
    #4
  5. Charles A. Lackman

    nick Guest

    Slightly off topic but then again, maybe not...

    Keep in mind that week numbers are not calculated the same way everywhere,
    just like the first day of the week is not always Sunday. It can also be
    Monday. The 2nd of January 2005 is in week 1 in some parts of the World and
    in week 53 in other.


    "Charles A. Lackman" <> wrote in message
    news:...
    > Hello,
    >
    > I have a DateTimePicker on my form and I need to make every Even week Red
    > and every Odd week Yellow.
    >
    > Any Suggestions will be greatly appreciated (Detailed help is even more
    > appreciated).
    >
    > Thanks,
    >
    > Chuck
    >
     
    nick, Nov 30, 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. Blue Streak
    Replies:
    1
    Views:
    534
    aa7im
    Mar 21, 2005
  2. venky

    Date time picker for asp.net

    venky, Apr 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    8,085
    Juan T. Llibre
    Apr 13, 2005
  3. TB
    Replies:
    0
    Views:
    479
  4. bala2008
    Replies:
    0
    Views:
    660
    bala2008
    Jun 27, 2008
  5. Replies:
    0
    Views:
    213
Loading...

Share This Page