Appcelerator PICKER with only day and month

is it possible to set a picker with only month and day ? I could not find this information into the documentation.

Upvotes: 0

Views: 339

Answers (1)

Sharif Abu Darda
Sharif Abu Darda

Reputation: 503

why not create your own custom picker for date and month,

var win = Ti.UI.createWindow({
exitOnClose: true,
backgroundColor:'#FFF',
});
var view = Titanium.UI.createView({
borderRadius:5,
backgroundColor:'#3f33fe',
width:100,
height:150
});
win.add(view);

var picker = Ti.UI.createPicker({
top:0,
height: '80%',
useSpinner: true
});
picker.selectionIndicator = true;

var column1 = Ti.UI.createPickerColumn();

for(i=1; i<13; i++){
var row = Ti.UI.createPickerRow({title: i

});
column1.addRow(row);
}

var column2 = Ti.UI.createPickerColumn();

for(j=1; j<32; j++){
var row = Ti.UI.createPickerRow({ title: j });
column2.addRow(row);
}

picker.add([column1,column2]);

view.add(picker);

win.open();
picker.setSelectedRow(0, 0, false); 
picker.setSelectedRow(1, 0, false); 

Upvotes: 2

Related Questions