Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need to fire textbox value change event in javascript, when i'm pickup the date into textbox from the calender controls.
Posted

I think you need to handle the OnSelectionChanged event in the Calendar control.
Every time that fires, set the textbox value to text from the calendar control.

Here[^] is a sample for the OnSelectionChanged event.
 
Share this answer
 
Comments
RaisKazi 3-Sep-11 7:21am    
Agree 5!
Abhinav S 3-Sep-11 7:23am    
Thank you.
Marikani P 3-Sep-11 7:25am    
I'm using javascript calendar so this will not work, pls say any other ways
Try as below code.

XML
<script type="text/javascript">
 function TestOnTextChange()
 {
   //Your Code
 }
</script>

HTML
<input type="text" id="myTextBox"
onchange="TestOnTextChange()">
 
Share this answer
 
Comments
Marikani P 3-Sep-11 7:19am    
this event fired while i'm typing text in textbox,
RaisKazi 3-Sep-11 7:22am    
Then you should do as suggested by Abhinav, in Solution-2.
Marikani P 3-Sep-11 7:20am    
i had set textbox as readonly=true, i can't text into textbox.
Marikani P 3-Sep-11 7:24am    
I'm using javascript calendar so this will not work
 
Share this answer
 
Comments
Marikani P 3-Sep-11 7:24am    
I'm using javascript calendar so this will not work
define function in javascript.
and
in code behind ( on page load write following code)

TextBox1.Attributes.Add("onChange", "function();")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900