Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1094] Date or time pickers: cannot use Ti.UI.* type constants, must use Titanium.UI.* abbreviations

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-07-21T19:35:15.000+0000
Affected Version/sAlloy 1.4.0
Fix Version/sAlloy 1.5.0, Alloy 1.4.1
ComponentsStyling, XML
Labelsqe-testadded
ReporterTim Poulsen
AssigneeTim Poulsen
Created2014-07-21T19:07:26.000+0000
Updated2014-07-28T18:43:44.000+0000

Description

The following code will generate an error because it uses type: Ti.UI.PICKER_TYPE_DATE_AND_TIME rather than type: Titanium.UI.PICKER_TYPE_DATE_AND_TIME. The same is true with any of the date or time type picker type constants.

view

<Alloy>
  <Picker id="testpicker"/>
</Alloy>

style

'#testpicker': {
  type: Ti.UI.PICKER_TYPE_DATE_AND_TIME
}

Comments

  1. Tim Poulsen 2014-07-21

    PR https://github.com/appcelerator/alloy/pull/489 (merged to master, cherry-picked to 1_4_X branch) Test app: use the test/apps/ui/datetime_picker app Functional test: Update the app's index.xml to specify the constant as Titanium.UI.PICKER_TYPE_DATE instead of Ti.UI.PICKER_TYPE_DATE. The app should build and run without errors, and display a date picker. Update the app again, removing the type assignment from XML and specifying it in the index.tss. You should test with both Ti.UI.PICKER_TYPE_DATE and Titanium.UI.PICKER_TYPE_DATE. In each case, the app should run without error, and display the date picker.
  2. Federico Casali 2014-07-28

    Verified as fixed. TiSDK 3.3.0.GA Appcelerator Studio 3.3.0.201407111535 CLI 3.3.0.GA Alloy 1.4.1-rc Google Nexus Galaxy 4.3 - iPhone 5 7.1.2 Closing.

JSON Source