Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1240] Date picker type cannot be specified in the TSS

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2015-10-21T23:46:43.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStyling, Tooling
Labelsn/a
ReporterMelvin Chia
AssigneeFeon Sua Xin Miao
Created2014-08-21T09:15:19.000+0000
Updated2018-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.

Comments

  1. Feon Sua Xin Miao 2015-10-21

    It should be type:Titanium.UI.PICKER_TYPE_DATE not type:"Titanium.UI.PICKER_TYPE_DATE"
       ".datePicker":{
       	type:Titanium.UI.PICKER_TYPE_DATE,
       	minDate:Alloy.CFG.minDate,
       	maxDate:Alloy.CFG.maxDate,
       }
       
  2. Eric Merriman 2018-03-07

    Closing as invalid. If this is incorrect, please reopen.

JSON Source