piceaTech/ember-rapid-forms

em-input type="date" causes problems with JQuery datepicker

Closed this issue · 1 comments

em-input type="date" creates a datepicker field, which is not supported by default in Firefox. So I tried JQuery datepicker for Firefox. However, doing that gives the following result:
image

in other words, the field becomes a text field and there is just an always open calendar underneath. Clicking on the calendar does nothing. The original field gets the markup

after initially being
{{em-input required="required" label="Start date" property="start" type="date" class="datepicker"}}

It seems to choose the wrong element. Going through after the document is ready and calling .datepicker() on input objects that are of type date works well.

$('input').each(function() {
 if ($(this).attr('type') === 'date') {
   $(this).datepicker();
 }
});