2

I have this problem using Jquery Mobile. The issue was I have a date value of "12/6/1999" that is displayed on a label. Now JQuery Mobile converted it to a link because it is recognize as a phone number. I'm not very sure if it's jquery that does that or the iPhone.

So, my first approach was I'm looking for a way to prevent jquery mobile to recognize phone numbers. Is there a way to do it?

If it's iPhone that does it, is there a way that I can disable it?

Your help is greatly appreciated.

mr.b
  • 2,708
  • 8
  • 39
  • 64

4 Answers4

2

You could try

<meta name = "format-detection" content = "telephone=no">

This will tell safari to not detect phone numbers.

More info on http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html

gsilvestrin
  • 196
  • 3
1

You can do this in two seperate ways.

HTML disabling

<p datadetectors="off">Header text with number 9123 3456</p> 
<p>Body text with number 9872 4567</p>

Or globally on your uiwebview

webview.dataDetectorTypes=0;
Nils Munch
  • 8,805
  • 11
  • 51
  • 103
0

What I did was something like this. Made the date as a href with no link.

<a href="#" class="unlink">2012-08-23/a>

Then applied CSS to modify the link to looks like texts.

.unlink {
    text-decoration: none;
    color: #333;
    cursor: text;
}
Prasad Rajapaksha
  • 6,118
  • 10
  • 36
  • 52
0

what is the input element type set to? make sure it's set to date.

Example:

<label for="date">Date Input:</label>
<input type="date" name="date" id="date" value=""  />

Docs:

Phill Pafford
  • 83,471
  • 91
  • 263
  • 383
  • Hi, Thank you for reply. But I don't think it will work. The type of element that I'm using for displaying the date value is a "" or "

    " tag. So, basically the purpose is just to display the date value coming from a web service.

    – mr.b Jun 05 '11 at 21:54
  • related: http://stackoverflow.com/questions/226131/how-to-disable-phone-number-linking-in-mobile-safari I think @gsilvestrin has the correct answer – Phill Pafford Jun 06 '11 at 12:58