How to disable a whole range of dates in "uidatepicker"?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lior Embon
am 2 Mai 2018
Kommentiert: Ameer Hamza
am 3 Mai 2018
I've added a uidatepicker to a GUI I'm building. I'd like to have a range of available dates and disable the rest according to some logic. I could only find the option to disable specific dates (or days of the week and so on).
Does anyone know of a way to define a range?
Thanks
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 2 Mai 2018
Bearbeitet: Ameer Hamza
am 2 Mai 2018
You can define a range of dates using
date_range = datetime('01/01/2018', 'InputFormat', 'dd/MM/yyyy'):datetime('29/03/2018', 'InputFormat', 'dd/MM/yyyy');
and then use it to disable dates
Myuidatepicker.DisabledDates = date_range;
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!