
page history view) will use the default for your locale, but that's acceptable.


#JQUERY DATEPICKER UI BROWSER COMPATIBILITY ISO#
Use Moment.js to accept localised user input, and convert it to ISO date format in a hidden field (server doesn't need to do conversion).Use Moment.js to format server-provided ISO format into a localised form (Moment.js supports dozens of locales).Use a minimal Modernizr include to determine HTML5 support on client.Don't use PHP's ICU formats (since it's hard to convert to a JS library compat format).Use short date formats as fallback input (e.g.Remove jQuery localisation files from repo (only used by datepicker).Rebuild jQuery bundle to exclude datepicker (if easy).Pass through min/max as properties on DateField.Make scaffolded and core DateField use HTML5 by default.Add default placeholder to DateField documenting date ordering for usability (if type=date isn’t supported).Replicate logic to TimeField (with type=time).Replicate logic to DatetimeField (with type=datetime-local) (nice to have).Point to type=date polyfill if CMS users are stuck on older browsers ( ) (building a MomentJS polyfill instead).Throw exception if locale or format isn't null or ISO on setHTML5(true) Document the limitations of DateField->setLocale() and setFormat() (will be overruled by browser on presentation on setHTML5(true)).Add DateField->setHTML5() (consistent with NumericField->setHTML5()).Remove DateField.js wrapper for jQuery UI.Remove DateField_View_JQuery and jQuery datepicker related logic.silverstripe/silverstripe-testsession#46.silverstripe/silverstripe-frameworktest#32.Given we want to remove jQuery UI from core in favour of React components, this was a good point to revisit the client-side library use as well.

Since the introduction of this functionality, we've gained a HTML5 date type which comes with built-in, localised date pickers in modern browsers like Chrome, IE Edge and Safari ( supported browser overview). This triggered a discussion whether the PHP API should care about these view aspects, in particular around the "sub views" implemented in DateField to support the CMS use case ( DateField_View_JQuery). Followup from #6194, where has refactored DateField->setConfig('showcalendar', true) to DateField->setShowCalendar(true).
