xxxxxxxxxx
1
<div class="row m-3">
2
<div class="col-sm-3 col-md-3 col-lg-3">
3
<div class="form-outline datetimepicker pubdatetime"
4
data-mdb-toggle-button="false">
5
<input type="text" class="form-control" id="pubdate"
6
data-mdb-toggle="datetimepicker"
7
data-mdb-formatDate='dd/mm/yyyy HH:MM' />
8
<label for="pubdate" class="form-label">Select Date and Time</label>
9
</div>
10
</div>
11
</div>
1
1
xxxxxxxxxx
1
let startdate ='25/02/2022';
2
let starttime = '09:23 AM'
3
const dateTime = document.querySelector('.datetimepicker')
4
mdb.Datetimepicker.getInstance(dateTime).dispose()
5
const myDatetimepicker = new mdb.Datetimepicker(document.querySelector('.pubdatetime'),
6
{ defaultDate:startdate,
7
defaultTime: starttime
8
});
Console errors: 0