Bootstrap 4 Tempus dominus

I’m using tempus dominus as my date and time picker.

Is there a way for the textbox to be empty unless you set a date?

Here is the pen: https://codepen.io/Supersudo/pen/VweBXpz

Hi @Chronzam, just omit the defaultDate option…

$(function () {
	$('#datetimepicker5').datetimepicker({
		format: 'YYYY-MM-DD',
		minDate: (new Date('1950-01-01')),
		maxDate: (new Date('2000-12-31')),
		useCurrent: false,
		defaultDate: (new Date('1950-01-01')), // <- remove this line
	});
});

I added that so that when the picker was opened, it starts at that date.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.