Reputation: 1099
I want to implement a calendar system (like Gregorian calendar) as a TDateTimePicker.
1) I want to know can I extend TDateTimePicker class to use its visual features but changing its calendar calculation system to match my calendar system?
2) If so then what I must to do? Which of the classes inside must be altered or extended to change its calculation system? what is the starting point?
Upvotes: 2
Views: 1053
Reputation: 4168
here is persian date picker :
https://github.com/A1Gard/PDate
about this:
The best Delphi & lazarus unit for convert windows standard DateTime to PersianDate & TimeStamp
version 1.3.1:
some bug fixed
version 1.3:
added lazarus compatibility
added function GetTheFirstDayOfThisMonth
added function GetTheFirstDayOfThisWeek
added function GetPersianDayWeek
added function Delphi DatePicker component
fixed bug in PersiantoGer function
version 1.2:
added function DateTimeToUnix
added function UnixToDateTime
version 1.1:
added function UIntToDateTime
added function GerToWord
added function PersianToInt
version 1:
added function GerToPersian
added function PersiantoGer
Upvotes: 2
Reputation: 595961
TDateTimePicker
is just a thin wrapper around Microsoft's DTP control. It does not support changing the underlying calendar system.
About Date and Time Picker Controls
The control is based on the Gregorian calendar, which was introduced in 1753. It will not calculate dates that are consistent with the Julian calendar.
Upvotes: 3