|
-
Oct 18th, 2012, 04:26 PM
#1
Thread Starter
Frenzied Member
How to set date in textbox?
Hello,
I have a StartDate and EndDate in an ASP.NET using VB.NET When the user fills in the StartDate and leaves that field I want to call a script to look at the EndDate and if it is earlier than the StartDate I want to set the EndDate to the same as the StartDate.
Can anyone point me in the direction for this?
Thanks!!
Warren
-
Dec 28th, 2012, 09:35 AM
#2
Hyperactive Member
Re: How to set date in textbox?
Do you want to do this in javascript or on the server? With JS, you will need to attach an event to the first textbox for when the tb looses focus. Then, use the DOM to get the value of the second TB. if it's empty, copy the first to the second. In JS, you can get a handle of an object, through the document object model, this way:
Var myTB = document.getElementByID("<%= ClientID.MyTbName %>")
if i was able to help, rate my post!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|