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?
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.Hello Gregory,
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?
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 nextHello Dick
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
First - I do not understand why You use 12 separate month calendar controls instead of use one streched (if You strech MC horizontal and/or vertical You will se more that one month - I'm pretty sure You know that). Using 12 controls sounds quitecomplicated to me instead of one.
Second - I do not want to restrict date range but just position a 3-month control so that current -1 month is the first one. In march I saw Jan-Mar range and now I see Apr-Jun but want at any time to see M-1 to M+1 to current date.
I'm not able to achieve that...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 62:42:41 |
Calls: | 6,654 |
Files: | 12,200 |
Messages: | 5,331,627 |