Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 18 Aug 2019, 00:33

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 15 Jul 2019, 18:39 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 11
Location: Brazil
Hello,

I'm using the standard Calendar designed by EhLib, but it's getting the wrong date on the days of the week.
For example:
July / 2019 is showing that started on a Tuesday, but the standard calendar began on a Monday. My default language is Portuguese / Brazil and the beginning of the week as "Sunday" LOCALE_IFIRSTDAYOFWEEK (Sunday).
How can I fix this?
I made this change:

TDaysCalendarViewEh.AdjustDateToStartForGrid
in the source: DateTimeCalendarPickersEh.pas
on line 1781:
Code:
   if FFirstWeekDayNum> 0 then
     Result: = Result + FFirstWeekDayNum - 7;


Image Image

I changed the 7 to 6 and began to draw in the correct position the days in the calendar
Code:
   if FFirstWeekDayNum> 0 then
     Result: = Result + FFirstWeekDayNum - 6;

But I do not know if this would be the best way to fix this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group