A pattern for a datepicker polyfill