[ALOY-1240] Date picker type cannot be specified in the TSS
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2015-10-21T23:46:43.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Styling, Tooling |
| Labels | n/a |
| Reporter | Melvin Chia |
| Assignee | Feon Sua Xin Miao |
| Created | 2014-08-21T09:15:19.000+0000 |
| Updated | 2018-03-07T22:28:26.000+0000 |
Description
views/index.xml contains:
<Picker class="datePicker" id="observation_date_picker" type="Titanium.UI.PICKER_TYPE_DATE"></Picker>
styles/index.tss contains:
"Picker":{
width:Titanium.UI.FILL,
height:Titanium.UI.SIZE,
selectionIndicator:"true",
useSpinner:"true",
}
".datePicker":{
minDate:Alloy.CFG.minDate,
maxDate:Alloy.CFG.maxDate,
}
Result: Date picker shows as expected.
However, when the type definition is moved into the .tss (usual case):
views/index.xml contains:
<Picker class="datePicker" id="observation_date_picker"></Picker>
styles/index.tss contains:
"Picker":{
width:Titanium.UI.FILL,
height:Titanium.UI.SIZE,
selectionIndicator:"true",
useSpinner:"true",
}
".datePicker":{
type:"Titanium.UI.PICKER_TYPE_DATE",
minDate:Alloy.CFG.minDate,
maxDate:Alloy.CFG.maxDate,
}
Result: The entire picker is not displayed at all. The class .datePicker is not defined anywhere else in index.tss. Any attempts to assign a date value to the picker results in an app crash.
This was tested on a Samsung Galaxy Note 2 LTE running Android 4.3. Project is based on the Default Alloy Project template.
It should be
type:Titanium.UI.PICKER_TYPE_DATEnottype:"Titanium.UI.PICKER_TYPE_DATE"".datePicker":{ type:Titanium.UI.PICKER_TYPE_DATE, minDate:Alloy.CFG.minDate, maxDate:Alloy.CFG.maxDate, }Closing as invalid. If this is incorrect, please reopen.