Date being displayed as a link on iOS


#1

Hi,

I have an app that displays dates as MM-DD-YYYY (example: 11-11-2014). Please note that this display format was not my choice. The HTML is very simple: It is very simple:

<div>11-11-2014</div>

On iOS the date is displayed as a link “11-11-2014” as a link.

On Android it is displayed correctly.

Is there some way that I can disable the link?

cordova: 4.0.0
ionic: 1.2.8

Thanks,

Joe


#2

Might need to turn it off in your config.xml:

<preference name="detect-data-types"          value="false" /> 

see: https://github.com/phonegap/phonegap-start/blob/master/www/config.xml


#3

Thank you. That is an excellent suggestion. I didn’t know about that option.


#4

It may be under a different name or config tag for Cordova VS PhoneGap, but it should be easy enough to find. :slight_smile:


#5

It must be a different name. I tried the experiment this morning and it did not disable detection. How would you suggest finding the preference name? I tried to search for it but everything looked related to phonegap.


#6

Hm. One other thing to try is maybe iOS thinks it is a phone number. Try putting this in the of your index page:

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

#7

That worked perfectly. Thanks again for your help.