labeltitaniumautolink

How to make a right date type for Titanium.UI.AUTOLINK_CALENDAR?


I had defined a Label with a date text value to test the property Titanium.UI.AUTOLINK_CALENDAR of autoLink,however it doesn't work. I am wonder there're must have some rules to write a formated date text value. Anyone have a good idea? Here is my code: (Running in Mac OSX,Platform:Android,Titanium SDK:3.5.1.GA)

test.xml

<Label id='test_label'>2015-09-10 14:00:00</Label>

test.tss

"#test_label":{
  width:'100%',
  height:'5%',
  autoLink:Titanium.UI.AUTOLINK_CALENDAR
}

Solution

  • Titanium.UI.AUTOLINK_CALENDAR is only supported in Android for label. On iOS, autolink is only supported on text areas: Refer Titanium.UI.AUTOLINK_CALENDAR and Titanium.UI.AUTOLINK_CALENDAR This is basically exposing a limitation of the native platform -- iOS does not natively support auto link calender in TextField or label.