{hero}

buttons.clear

Since: DateTime 1.1.0

Enable button to clear the value.
Please note - this property requires the DateTime extension for DataTables.

Description

When enabled, this option will cause DateTime to show a clear button (text set by i18n.clear) which they user can activate to clear the input's value.

Default

  • Value: false

Button will not be shown.

Example

Enable clear button:

new DateTime(document.getElementById('test'), {
	buttons: {
		clear: true
	}
});

Related

The following options are directly related and may also be useful in your application development.