I am developing asp.net application that will be used primarily on iPhones. On one of the forms I have a textbox where users enter a date. I am using a javascript calendar on that same box so its easier for users to enter dates. But when a user clicks on
this field in iPhone, the phone brings up its own menu (with keyboard) on top of my javascript calendar. That makes it look very ugly as a user now has to click on Done to close that keyboard and onyl then start using the calendar. Is there a way to prevent
iPhone from displaying this keyword? Thanks
Instead of showing calendar, when the focus is on textbox, try to provide a button. If user clicks on button, display calendar, let him choose the date. The chosen date is displayed in the textbox. You can overcome this problem.
NOTE: Its a default behaviour of Mobile safari browser, to display keypad, on focus for text boxes.
Thanks. I was tinkering with it and found a very simple solution. I added ReadOnly="true" and that prevents the keyboard from loading. But thanks anyway
Member
22 Points
173 Posts
iPhone Safari textbox question
Jul 13, 2010 06:18 PM|faremax|LINK
I am developing asp.net application that will be used primarily on iPhones. On one of the forms I have a textbox where users enter a date. I am using a javascript calendar on that same box so its easier for users to enter dates. But when a user clicks on this field in iPhone, the phone brings up its own menu (with keyboard) on top of my javascript calendar. That makes it look very ugly as a user now has to click on Done to close that keyboard and onyl then start using the calendar. Is there a way to prevent iPhone from displaying this keyword? Thanks
Star
14065 Points
3270 Posts
Re: iPhone Safari textbox question
Jul 14, 2010 02:13 PM|roopeshreddy|LINK
Hi,
Instead of showing calendar, when the focus is on textbox, try to provide a button. If user clicks on button, display calendar, let him choose the date. The chosen date is displayed in the textbox. You can overcome this problem.
NOTE: Its a default behaviour of Mobile safari browser, to display keypad, on focus for text boxes.
Hope it solves ur problem...
Roopesh Reddy C
Roopesh's Space
Member
22 Points
173 Posts
Re: iPhone Safari textbox question
Jul 14, 2010 02:49 PM|faremax|LINK
Thanks. I was tinkering with it and found a very simple solution. I added ReadOnly="true" and that prevents the keyboard from loading. But thanks anyway