surveyjs / custom-widgets

The collection of custom widgets for SurveyJS: Survey Library and Survey Creator :package:
https://surveyjs.io
MIT License
79 stars 78 forks source link

Bootstrap-datepicker doesn't apply format to date passed from model #226

Closed tsv2013 closed 4 years ago

tsv2013 commented 4 years ago

See the https://surveyjs.answerdesk.io/ticket/details/t5690/bootstrap-datepicker-formatting-not-applied-on-initial-if-used-with-defaultvalueexpression thread for more details

var json = {
    "elements": [
        {
            "name": "date",
            "type": "bootstrapdatepicker",
            "inputType": "date",
            "title": "Your favorite date:",
            "defaultValueExpression": "today()",
            "dateFormat": "MM dd, yyyy",
            "isRequired": true
        }
    ]
};

The initial value (today) is not properly formatted