Hi,
I am trying to make a DateTimePicker readonly and having limited success. A forum search returns a ton of candidate workarounds for this, but some of them stretch back to 2009 and it is very difficult to figure out whether these workarounds are still valid, supported, required or optimal with the latest release.
I am trying to suppress input (either keyboard, mouse, direct input or via the calendar dropdown) for a datetimepicker and the logical approach would seem to be to set the ReadOnly property to true, but this doesn't appear to have any effect.
The most common approach on the forums (from 2009 onwards) is to set the control to disabled and then fudge the styling to make it match other readonly controls, which is the approach we have taken in the past. However we are currently refactoring our control code with a view to simplifying it by removing any overly complicated hacks and fudges, so ideally this is an approach we are looking to replace.
Many of the posts recommending this approach are over 8 years old, so I am hoping this has been superseded but I am again struggling to achieve this intuitively with the latest control release.
Is there a way to set the control to readonly rather than disabled, or is the styling approach still the recommended solution?
Thanks,
Mark.