Jump to content

how to change a date in a calendar created by GUICtrlCreateMonthCal


Recommended Posts

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

Boom :huh2:

#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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...