I am looking at the documentation for the CSOM and I am not finding anything for the WebDatePIcker in particular the ValueChanged event.
Also are there any examples of using the CSOM?
ThanksRon
Hi Ron,
The ClientEvents.ValueChanged event is inverited from WebTextEditor. The evtArgs is instance of $IG.TextEditorValueChangedEventArgs class. If you cannot find docs for that event, then you may check available public functions from debugger: look at evtArgs and find methods with naming convention get_xxx(..) and set_xxx(...).
Below is example:
function valueChangedEvt(editor, evtArgs){ //debugger; alert("valueChangedEvt oldVal="+evtArgs.get_oldValue()+" newVal="+evtArgs.get_value());}
Thanks,
With the ASP.Net non-AJAX control I was able to do something like the following on the client side how can I do the same thing using the AJAX enabled controls?
<script type="text/jscript" language="javascript">
function showCaret(editor, evtArgs) {debugger;var dtArrival = new Date();var oArrival = GetControlByID("wdcArrival");if (!oArrival) return false;
var dtDeparture = new Date();var oDeparture = GetControlByID("wdcDeparture");if (!oDeparture) return false;
var oNights = GetControlByID("wcNights");if (!oNights) return false;var iNights = oNights.getvalue;
var msPerDay = 24 * 60 * 60 * 1000;dtArrival.setTime(oArrival.getvalue());if (isNaN(dtArrival)) return false;dtDeparture.setTime(dtArrival.getTime() + (iNights * msPerDay));oDeparture.setValue(dtDeparture);
}
function GetControlByID(sName, bCombo) {var ctlif (bCombo) {ctl = igdrp_getComboById(sName);} else {ctl = document.getElementById(sName);};
if (ctl) return ctl;//did not find the control by typical namevar allElms = document.body.getElementsByTagName("*");
for (var c = 0; c < allElms.length; c++) {var itm = allElms[c];if (itm.id) {if (itm.id.length > sName.length) {if (itm.id.substring(itm.id.length - sName.length).toLowerCase() == sName.toLowerCase()) {if (bCombo) {ctl = igdrp_getComboById(itm.id);if (ctl) return ctl;} else {return itm;};};};};};
return null;}
</script>
One other thing I have noticed is if you select a date with the dropdown calendar the value changed client sided event is not called and you also can not select today's date even though the current value is blank.
Thanks for your helpRon