A Southwestern adventurer striking out into the badlands of the Midwest for fun, profit, and for a wife who wouldn't move back to the Southwest :)
Wednesday, May 11, 2011
Passing Client Side Dates to Server Side Vars With Telerik Rad Controls
Ok, sometimes you need to pass a client side datetime value from a Raddatetimepicker up to the server side for use. Sometimes with localization this can get kind of tricky, but Telerik introduced a new method to make this somewhat less painless.
var dt = $telerik.findDatePicker("controlID", null);
var dtValue = dt.get_selectedDate().format("yyyy/MM/dd");
This method will put your datetime value in a format that is SQL server friendly. Happy coding.