8

I realize that there is a meta tag for disabling the auto formatting of a telephone number in iOS but I wondered if its possible in iOS for things like a date or time.

Anyone have any ideas?

Kara
  • 6,115
  • 16
  • 50
  • 57

4 Answers4

3

There is no meta way at the moment. However there are two tricks to break the detection.

I advise to split the date/time with a harmless HTML element, like a span:

Mon<span></span>day

Another trick is adding a zero-width space:

Mon&#x200B;day

However this is less stable, for example in the preview text of iOS 6-8, there the zero with space is displayed like a regular space.

bwb
  • 396
  • 2
  • 4
2

Add this tag to your header

<meta name="format-detection" content="date=no">
coliff
  • 812
  • 8
  • 12
2

This isn't possible for dates or addresses. Unfortunately, phone numbers are the only type covered in Apple's documentation: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

Cœur
  • 37,241
  • 25
  • 195
  • 267
CLL
  • 1,312
  • 3
  • 13
  • 26
0

Or just hide it with css by styling the generated links like

your-element-containg-days a {
    color: #000 !important;
    text-decoration: none !important;
        }

You have to add !important to overrule the generated styling.

webfed
  • 11
  • 1
  • To the person who downvoted this: this is a valid answer. Oftentimes in the email world, one needs to hide auto-generated links instead of completely remove the functionality. It is an effective way to faux-disable these automations. – Nathan Dec 27 '19 at 02:50
  • The only thing is that this doesn't work with email clients. Otherwise it is a valid solution in html world – Darpan Mar 04 '20 at 18:04