I want to change the display format of the date for dijit dateTextBox.
Currently my date is displaying like this
My declaration is like this
<input type="text" data-dojo-type="dijit/form/DateTextBox" data-dojo-attach-point="theInput" />
But I would like to change the format to any format I want for example September 14, 2017, or 09-14-2017.
Also if entering the format using keyboard, is it possible to validate against that same format - I.e. when user types in the data it has to be in that format or the invalid message appears.
EDIT: All I could find was mention of the constraints which allows you to set both the input constraints and formatting - but there are no examples in the documentation how to use this. It would be nice to see both declarative and programmatic example.
Also according to some other posts here in declarative markup you can specify constraints like
data-dojo-props="constraints:{datePattern:'yyyy-MM'}"
However I want to do this programmatically but when I inspect the input object
this.theInput.constraints
there is no such property as datePattern, or min and max.

