View Source

h3. DateSpinner

The DateSpinner component uses a mobility-designed date selection component and may be optionally rendered depending on whether the mobile operating system is using iOS or Blackberry by using the "useNative" attribute. If the device is running iOS5 or Blackberry and useNative="true", then the inherent date selection component is used (so for iPhone, iPad running iOS5) the native dateSelection will be used (html5 input tag with type="date"). If iOS is not detected and the useNative attribute is false, then the <mobi:dateSpinner/> component renders a mobility designed non-browser solution which with popup selector, styled with <mobi:deviceStyleSheet/>. This component has mobi:ajax support.

{note}

Each device will popup the correct entry spinner that is styled as per the device; JSF validation and conversion is supported. The non-iOS version will actually have built-in conversion for date, so as long as the default pattern of 'yyyy-MM-dd' is used, then no <f:convertDateTime pattern="yyyy-MM-dd" /> tag is required.
The developer will have to know what platforms they are creating applications for in that some of these options are not applicable to the iOS supported inherent selection.


{note}


h3. Usage

If enabling iOS if detected
{code}
<mobi:dateSpinner value="#{dateBean.someDate}" useNative="true"
<f:convertDateTime pattern="yyyy-MM-dd" timezone="MST"/>
</mobi:dateSpinner>
{code}


h3. Component Documentation
[dateSpinner|http://res.icesoft.org/docs/icemobile/v1_latest/jsf/tld/mobi/dateSpinner.html]