Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
get/set values of WebDatePicker client-side
posted

I am using a WebDialogWindow to provide a modal dialog box for editing the contents of a WebDataGrid. I'm having some trouble getting and setting the value of a WebDatePicker in that modal dialog.

<script language="javascript">

var currentRow;

function gridTemplateOpening(sender, args)

{

var dialog = $find('<%= cnModalDialog.ClientID %>');

currentRow = args.get_row();

var dateText = currentRow.get_cellByColumnKey("expire_datetime").get_text();

$get("<%=cnTextBox.ClientID%>").value = dateText;

$get("<%=cnWebDatePicker.ClientID%>").value = dateText;

dialog.set_windowState($IG.DialogWindowState.Normal);

}

</script>

In this example cnTextBox is an asp:TextBox control. This control displays the date from column "expire_datetime" just fine. The cnWebDatePicker (a WebDatePicker control) however shows no selected value when the dialog opens. Does it not have a .value property or is that not the correct way to set it's value? Better yet, can you direct me to the CSOM documentation for the WebDatePicker control? I have not been succesful finding it.

My environment is 2010.vol 2 CLR 2.0