Skip to main content Accessibility Feedback


Test if input[type="date"] is supported by the browser.

Works in all modern browsers, and at least back to IE9.

 * Test if the browser supports input[type="date"]
 * @return {Boolean} Returns true if it's supported
var isDateSupported = function () {
	var input = document.createElement('input');
	var value = 'a';
	input.setAttribute('type', 'date');
	input.setAttribute('value', value);
	return (input.value !== value);