How to use the Microsoft ActiveX Calendar control in an XUI dialog

Submitted by: Jason Aiken Last Updated: 2006-08-10

When a date is selected, a nearby text box is automatically updated.

Thanks be to Clay Helberg for inspiring new ideas, swapping code snippets, and growing more thirsty.

  1/1/1900    var dlgDoc = Application.activeWindow.activeView.document; var textbox = dlgDoc.getElementById("revDateTextBox").firstChild; textbox.replaceData(0,textbox.length,formatDate(revDateCal.Value)); function formatDate(date) { // do date formatting return dateFormat; }

Note: ActiveX controls can't be used from JavaScript, Jscript or VBscript must be used.