tempusdominus / bootstrap-4

Tempus Dominus Bootstrap 4 Datetime Picker
https://getdatepicker.com/5-4/
MIT License
611 stars 239 forks source link

When I set value attribute as default, cause "Maximum call stack size exceeded" error. #309

Open kafetora opened 4 years ago

kafetora commented 4 years ago

I want to hide Datepicker widget when clicking outside. so I tried to add a "datetimepicker-input" class with referring to #171.

But When I set value attribute as default like a "2020-02-14", cause "Maximum call stack size exceeded" error and Datepicker widget does not work.

Code

<div class="form-group mr-lg-3">
  <input
    id="delivery-scheduled-day"
    data-toggle="datetimepicker"
    data-target="#delivery-scheduled-day"
    class="datetimepicker-input input-date form-control form-control-sm"
    type="text"
    value="2020-02-20">
</div>

$('#delivery-scheduled-day').datetimepicker({
    dayViewHeaderFormat: 'YYYY/ M',
    format: 'YYYY-MM-DD',
});

Environment

bootstrap : 4.1.3 jQuery 3.4.1 moment: 2.24.0 This package: 5.1.2 SBadmin2

And Happy Valentine’s Day!

dilrajsachdev commented 4 years ago

Hey, Did you find any solution for this ?

kafetora commented 4 years ago

@dilrajsachdev Not yet. The problem was that value attribute was set.

I could not find any solution, so I use to another datepicker. hahaha.