1

I am working on a PHP application and it will work on Ipad,PC,Iphone,android phones etc. I am using jquery datepicker at one place. Now while working on ipad whenever i m tapping on date field,immediately Ipad keyboard comes. And as per My requirement there is no need for keyboard. I tried the solution given here

But it didn't worked because i am using a different date-picker.So please suggest a fast method if you knows

Community
  • 1
  • 1
anuj pradhan
  • 2,777
  • 4
  • 26
  • 31
  • I tried disabling the input field on Click event and also tried to make it read only but every time on tap of input-field keyboard came up – anuj pradhan Jan 26 '13 at 05:57
  • And now for my third trick I now telepathically know what his code is. – jeremy Jan 26 '13 at 06:00
  • Have you tried providing an icon to click on and allow the calendar to open up only on that icon click, not when the input field is clicked? You can use jQuery calendar's buttonImageOnly property for this. – legendofawesomeness Jan 26 '13 at 06:01
  • @Nile Funny guy. I cant paste a huge code here. I am just asking for an idea .I will try to implement every idea – anuj pradhan Jan 26 '13 at 06:04
  • @legendofawesomeness ,as per our client requirement, they dont want any date selector like a Icon,button then just want it On tap. – anuj pradhan Jan 26 '13 at 06:05

2 Answers2

0

Try adding the readonly="true" attribute to the field to stop the iPad Keyboard popup.

iProgrammed
  • 980
  • 2
  • 10
  • 29
thordarson
  • 5,943
  • 2
  • 17
  • 36
  • He said he tried the solutions on the page that he linked to (this was one answer to te question) – jeremy Jan 26 '13 at 06:00
  • You're right, I was a bit quick there. He said solution (singular) though, and I immediately jumped to the accepted answer. – thordarson Jan 26 '13 at 06:02
  • I only have one solution remaining , instead of making a Input field i can give I div which will look similar to Input field and on click on that div i can show the date-picker .But i am looking for a easy to use solution because this must be a frequent problem while using IPAD,IPhone – anuj pradhan Jan 26 '13 at 06:09
  • I even tried to stop the HTML Events using event.stopImmediateEventPropogation() but it didn't worked. – anuj pradhan Jan 26 '13 at 06:11
  • I'm stumped then, sorry. I don't have my iPad with me to test things. – thordarson Jan 26 '13 at 06:14
0

you can disable it.like this

$(".datePicker").datepicker({
    showOn: 'button',
    onClose: function(dateText, inst) 
    { 
        $(this).attr("disabled", false);
    },
    beforeShow: function(input, inst) 
    {
        $(this).attr("disabled", true);   //set disable to true
    }
});
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70
  • @Ravindra..I tried it buddy. It is not working. Thanks for your reply.But looking forward for more help. The problem is , Ipad will consider tap as an event and will show the Keypad immediately. – anuj pradhan Jan 26 '13 at 06:40