from System.Windows.Forms import Form, MonthCalendar
#create a calendar
calendar = MonthCalendar()
#define what to do with the selected date
def onPickDate(sender,eventArgs):
selectedDate = calendar.SelectionRange.Start.ToShortDateString()
print selectedDate
Document.Properties["selectedDate"] = selectedDate
calendar.DateSelected += onPickDate
#put calendar in a form and show it
form = Form()
form.Text = "Select a date and close the form when done"
form.Controls.Add(calendar)
form.ShowDialog()
#create a calendar
calendar = MonthCalendar()
#define what to do with the selected date
def onPickDate(sender,eventArgs):
selectedDate = calendar.SelectionRange.Start.ToShortDateString()
print selectedDate
Document.Properties["selectedDate"] = selectedDate
calendar.DateSelected += onPickDate
#put calendar in a form and show it
form = Form()
form.Text = "Select a date and close the form when done"
form.Controls.Add(calendar)
form.ShowDialog()
ConversionConversion EmoticonEmoticon