Replying on message of Tue, 23 Mar 2021 10:00:23 -0700 (PDT) from
Grzegorz R.:
Hello Grzegorz R.
I have MC streched vertically to have 3 months at once.
My problem is that the top month is NOT the current one of selected or current date - for example today (23/03) it shows Jan-Mar instead of Mar-May.
Surprisingly at design (editor) it works/shows fine.
Is there a way to force MC to start with month of selected/given date?
Hello Gregory,
I am not sure what you are doing, I'll explain what I am doing:
I have a datawindow on which I have 12 month calendar controls (3 rows
of 4) so a user can set days off for employees by directly selecting
one or more dates.
In the design mode it now shows March 2021 for every of the 12 month
calendars (as it is now Match 2021) .
Then, on postinit, I call a method to determine what I want to see as
first month (which is the previous month) in the first monthcalendar
(mc1) and after that I set all the other controls (mc2-mc12) as well,
like this:
LOCAL oDR AS DateRange
LOCAL dDatum AS DATE
dDatum:=BoM(dStart-35) // Begin at last month
oDR:=DateRange{dDatum,dDatum+1} // set 1 day range for next
control
SELF:oDCmc1:Selectionrange:=oDR // set date range to this day
(//set dDatum to next month and then):
SELF:oDCmc2:Selectionrange:=oDR // set date range to this day
etc for all controls mc1-mc12
Does this help?
Dick
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)