locked
iPhone Safari textbox question RRS feed

  • Question

  • User-953209254 posted

    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

    Tuesday, July 13, 2010 6:18 PM

Answers

  • User-953209254 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 14, 2010 2:49 PM

All replies

  • User1943143334 posted

    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...

    Wednesday, July 14, 2010 2:13 PM
  • User-953209254 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 14, 2010 2:49 PM