Imbuter2000 Posted June 15, 2011 Share Posted June 15, 2011 How can I change in a script the date selected in a calendar created by GUICtrlCreateMonthCal? I have two calendars that I use for setting a FROM and a TO date and I want to automatically copy the FROM date to the TO date when the user click on a FROM date... (and not viceversa) Link to comment Share on other sites More sharing options...
smartee Posted June 15, 2011 Share Posted June 15, 2011 Boom #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 484, 186, 264, 186) $MonthCal1 = GUICtrlCreateMonthCal("2011/06/15", 8, 8, 229, 164, -1, 0) $MonthCal2 = GUICtrlCreateMonthCal("2011/06/15", 248, 8, 229, 164, -1, 0) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $MonthCal1 GUICtrlSetData($MonthCal2, GUICtrlRead($MonthCal1)) EndSwitch WEnd Link to comment Share on other sites More sharing options...
Imbuter2000 Posted June 15, 2011 Author Share Posted June 15, 2011 Great! thanks! In my tests I tried to use GUICtrlSetData with "06/06/2011" and it didn't work because the correct data format to set it is "2011/06/06"! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now