true
if the current browser supports the native date input <input type="date" />
:const isDateInputSupported = function () {// Create new input elementconst ele = document.createElement('input');// Set the type attributeele.setAttribute('type', 'date');const invalidValue = 'not-a-valid-date';// Set an invalid valueele.setAttribute('value', invalidValue);// If the browser supports the date input,// it won't have effect on the `value` attribute// `ele.value` will be an empty string//// In the other case, the input is treated as normal text input// and `ele.value` returns the original valuereturn ele.value !== invalidValue;};