Validation
Mark a date invalid with your own message using calendar.validate in @pglejzer/datepicker-ui.
Weekdays only
#calendar.validate runs on the presented value (null when empty) after setValue(), typed input and every commit. Return a message to mark the input invalid, or null, undefined or an empty string when the value is fine. It never blocks a pick or a commit.
A message sets aria-invalid on the input and emits an error event with the code invalid-value. The demo shows it under the field, wired to the input with aria-describedby. Pick a Saturday or a Sunday and confirm to see it.
Typed dates
#Typed text that is not a date, or a date outside minDate and maxDate, emits error with the code invalid-date or unavailable-date. The default messages are labels.invalidDate and labels.unavailableDate. The same onError callback receives them, so the message above covers those cases too.
Docs: Typed Input · Events · Options