EhLib.Com https://forum.ehlib.com/en/ |
|
Column with dropdown calendar https://forum.ehlib.com/en/viewtopic.php?f=5&t=987 |
Page 1 of 1 |
Author: | danieldavila [ 15 Jul 2019, 18:39 ] |
Post subject: | Column with dropdown calendar |
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; 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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |