Topic: Pickadate showing disabled fields on initial rendering

Szymon Borucki free asked 7 years ago


Hi, I'm trying to show pickadate datepicker in my Rails app. When I click the input field, it show this My markup, generated with simpleform, is:

<div class="md-form">
<input class="string optional datepicker picker__input" id="visit_visit_date" name="visit[visit_date]" size="50" type="text" readonly="" aria-haspopup="true" aria-expanded="false" aria-readonly="false" aria-owns="visit_visit_date_root">
<div class="picker" id="visit_visit_date_root" aria-hidden="true">...
I initialize the picker with:

$('.datepicker').pickadate()
When i first click on it, it shows like in the linked picture. If I close it and click again, it renders the proper picker. Same if I choose a date/clear in the initial picker, when i open it again it render properly. Any idea why it might be happening? BTW - if i use following markup

<div class="md-form">
    <input placeholder="Selected date" type="text" id="date-picker-example" class="form-control datepicker">
    <label for="date-picker-example">Try me...</label>
</div>
it has the same problem as above BUT if i user this (without md-form)

 <input placeholder="Selected date" type="text" id="date-picker-example" class="form-control datepicker">
it always renders properly.

Marta Wierzbicka staff answered 7 years ago


Hello, I can't recreate your problem. Could you send here some demo? Best, Marta

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: Yes