Pro JSF and HTML5 by Hazem Saleh & Allan Lykke Christensen & Zubin Wadia

Pro JSF and HTML5 by Hazem Saleh & Allan Lykke Christensen & Zubin Wadia

Author:Hazem Saleh & Allan Lykke Christensen & Zubin Wadia
Language: eng
Format: mobi
ISBN: 9781430250104
Publisher: Apress
Published: 0101-01-01T00:00:00+00:00


Figure 7-5. The <projsfhtml5:inputDate /> component in action

Fallback for Unsupported Browsers

A browser that does not support HTML date input renders a plain text field with the date like the color input in the previous section. To provide a fallback, we can once again use JavaScript to check if the feature is supported in the browser, and if it isn’t, we can provide an alternative display of the control. In the following example we have used Modernizr to check if the feature is supported in the browser, and if it is not we use the DatePicker component of JQuery-UI as seen in Figure 7-6.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.