Reputation: 16077
What is best way to show Date Picker for iPhone based Web Application. Can we show something like iPhone native date picker like shown below in web application:
Upvotes: 52
Views: 100130
Reputation: 99
<input type="date" />
above code WILL NOT working on mozilla.
firefox doesn't support input type date.
Upvotes: 0
Reputation: 11
There is an iPhone style date picker for HTML5 at Next-Point. Maybe you can change it to meet your needs.
Upvotes: 1
Reputation: 4647
Although the need to register might be a dislike, Mobiscroll looks worth evaluating if you want to provide a consistent fallback for older ios (pre 5.x) and android (pre 4.x) devices - and probably some other platforms, as it promises to support jQMobi (now Intel appframework) and Zepto.
Upvotes: 1
Reputation: 1
In ASP.Net you can use the TextBox with type="date".
<asp:TextBox type="date" runat="server" />
In a Html5 compatible browser you will have a date field. In a Html5 non-compatible browser you will have simple text field.
Upvotes: -1
Reputation: 2685
The easiest way (and arguably the best way) is to use safari's built in datepicker for your input box using HTML5 type="date"
<input type="date" />
Upvotes: 129
Reputation: 3350
I know it's an old post, but for future viewers: If you are using jQuery, you can try Mobiscroll, a customizable datepicker optimized for touch devices. It ships whith iOS and android skin as well.
Upvotes: 11
Reputation: 415
There is an iPhone native style date picker that runs in the browser - http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touch/11
Upvotes: 36
Reputation: 4641
Well, you could code your own if it was really important to you.
With enough work you could probably get it to look/feel a lot like Apple's native control.
Feels at a gut level like it would be a lot of work for limited payoff.
Upvotes: 0
Reputation: 12187
You can't. The date picker is a native control and is not available in Mobile Safari.
Upvotes: 1