I have a problem I been trying to solve.
When a user selects a date from the calendar the textbox needs to display this date plus one year.
I have tried using addyear but it is not working properly. I tried google but not quite finding what I am looking for. Can anyone help?
I am using asp.net and the textbox name I have to use is input_txtDate1.Text.
Datetime help on asp.net
-
- Registered User
- Posts: 10628
- Joined: 26 Mar 2007, 02:00
- Location: In the river of thoughts
- Contact:
-
- Registered User
- Posts: 20576
- Joined: 19 Sep 2003, 02:00
- Location: Bloodbank
Re: Datetime help on asp.net
You are refering to an action which needs to happen client-side. This you would have to do with JavaScript.
- Spoiler (show)
-
- Registered User
- Posts: 10628
- Joined: 26 Mar 2007, 02:00
- Location: In the river of thoughts
- Contact:
Re: Datetime help on asp.net
How does it work? Also I forgot to mention it must open happen once not everytime they open the page.
-
- Registered User
- Posts: 20576
- Joined: 19 Sep 2003, 02:00
- Location: Bloodbank
Re: Datetime help on asp.net
I am not too hot on JS might want someone else to give you a couple of pointers.
- Spoiler (show)
-
- Registered User
- Posts: 10628
- Joined: 26 Mar 2007, 02:00
- Location: In the river of thoughts
- Contact:
Re: Datetime help on asp.net
Ok. I got it to add year year to the date. Problem is it changes the date of current saved data which it must not do.