The date picker will throw errors for a number of different reason. Most errors are related to an invalid setup.
Except where noted, the thrown errors are a type of
Where indicated the error provides a code value so that a developer can check for this value.
An error indicating that a key in the options object is invalid.
An error indicating that one more keys in the options object is invalid.
An error when an option is provide an unsupported value. For example a value of 'cheese' for toolbarPlacement which only supports 'top', 'bottom', 'default'.
An error when an option value is the wrong type. For example a string value was provided to multipleDates which only supports true or false.
An error when an option value is outside of the expected range.
restrictions.daysOfWeekDisabled excepts a value between 0 and 6.
An error when a value for a date options couldn't be parsed. Either the option was an invalide string or an invalid Date object.
An error when an element to attach to was not provided in the constructor.
An error if providing an array for the events to subscribe method doesn't have the same number of callbacks. E.g., subscribe([1,2], )
The configuration has conflicting rules e.g. minDate is after maxDate
Logs a warning if a date option value is provided as a string, instead of a date/datetime object.