I have this..
<ig:WebDatePicker ID="WebDatePicker1" runat="server" DisplayModeFormat="g" EditModeFormat="g" StyleSetName="Default" StyleSetPath="ig_res"> <ClientSideEvents CalendarClosed="CalClose1" /> </ig:WebDatePicker>
so when the calendarClosed event is hit I want it to run this function.
function CalClose1() if icount1 =0 then icount1=1 webdatepicker1.value = webdatepicker1.value & " 12:00:00 AM" end if end function
I get an error from your javascript saying CalClose1 must be a function..
someone wanna tell me what I have done wrong?
entire script below
<script type="text/script" language="vbscript"> dim icount1 dim icount2 function CalClose1() if icount1 =0 then icount1=1 webdatepicker1.value = webdatepicker1.value & " 12:00:00 AM" end if end function function CalClose2() if icount2 =0 then icount2=1 webdatepicker2.value = webdatepicker2.value & " 11:59:59 PM" end if end function </script>
Hello,
You should use javascript to get the old and new values in the client side CalendarClosed event. The event is passed two arguments sender (the WebDatePicker Control) & eventArgs. From the eventArgs you can get the old and new values:
function CalendarClosed(sender, eventArgs){ ///<summary> /// ///</summary> ///<param name="sender" type="Infragistics.Web.UI.WebDatePicker"></param> ///<param name="eventArgs" type="Infragistics.Web.UI.TextEditorValueChangingEventArgs"></param>
var old_val = eventArgs.get_oldValue(); var new_val = eventArgs.get_value();
....
}
Thanks,
Valerie
more to go with this..
I am using the calendar closed client side event to try and get the date, I need to be able to manipulate it. however, it always comes up null first time and last date entered every other time.
How can I get the value selected on the calendar on the client si9de?