Date being displayed as a link on iOS

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

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

1 Like

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

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

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.

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">
1 Like

That worked perfectly. Thanks again for your help.

1 Like