gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 370 forks source link

Date rendered as type text instead of date #533

Open priyankShahDavita opened 7 years ago

priyankShahDavita commented 7 years ago

I am trying to render a field as a date but it always shows up as a text box and not a date picker in the browser.

I included both moment.js and bootstrap-datepicker.js as mentioned on some of the other posts but when I do an inspect element on the date field, the HTML always show type="text" instead of type="date".

The schema JSON has the field like this:

"dateReceived": { "format": "date", "type": "string" }

The options JSON has it like this:

"dateReceived": { "label": "Date received:", "dependencies": { } }

Note: This form shows the field as a date when the form is being previewed in Cloud CMS. The issue happens only when I render the form in a browser.

Avtonom commented 6 years ago

@priyankShahDavita was there a solution?