1

I looked, but none of the questions managed to answer my doubt, so I decided to do this topic.

That is my front end HTML:

<div class="col">
    <label>Star Date *</label>
    <div class="input-group date" id="datetimepicker1" data-target-input="nearest">
        <input type="text" id="datetimepicker1Input" class="form-control datetimepicker-input" data-target="#datetimepicker1" disabled>
        <div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
            <div class="input-group-text"><i class="fa fa-calendar"></i></div>
        </div>
    </div>
</div>

And that is my JavaScript

$('#datetimepicker1').datetimepicker({
    //locale: 'pt-BR',
    format: 'DD/MM/YYYY HH:mm:ss',
    maxDate: dateTomorrowBlock,
});

I tried to disable the field, but while doing this, it is also disabling the calendar field and I can not enter any value.

VincenzoC
  • 30,117
  • 12
  • 90
  • 112
AllMuch
  • 29
  • 7
  • 1
    Can you create a fiddle to demo this issue? – maxshuty Apr 09 '19 at 19:19
  • You can use `readonly` instead of `disabled` and add [`ignoreReadonly`](https://eonasdan.github.io/bootstrap-datetimepicker/Options/#ignorereadonly) option, [here](https://stackoverflow.com/a/46414917/4131048) a live sample. – VincenzoC Apr 09 '19 at 21:20
  • @VincenzoC worked perfectly, thx! – AllMuch Apr 09 '19 at 22:32

0 Answers0