Search code examples
delphidatepickercalendarpersian

Delphi: Can I extend TDateTimePicker to support another calendar system? How?


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?


Solution

  • 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.