Skip to content

Instantly share code, notes, and snippets.

@hal-gh
Created December 26, 2011 02:05
Show Gist options
  • Save hal-gh/1520393 to your computer and use it in GitHub Desktop.
Save hal-gh/1520393 to your computer and use it in GitHub Desktop.
picker test
Titanium.UI.setBackgroundColor('#000');
var win1 = Ti.UI.createWindow({
backgroundColor:'white',
fullscreen:false,
exitOnClose:true
});
var minDate = new Date(2011,11,1);
var maxDate = new Date(2012,11,31);
var value = new Date();
var picker = Ti.UI.createPicker({
locale:'fr',
type:Ti.UI.PICKER_TYPE_DATE_AND_TIME,
minDate:minDate,
maxDate:maxDate,
value:value
});
picker.setLocale('fr');
Ti.API.info('The current picker value is: ' + picker.value)
win1.add(picker);
win1.open();
[INFO] One moment, building ...
[INFO] Titanium SDK version: 1.8.0.1 (12/22/11 13:09 fbdc96f)
[INFO] iPhone Device family: universal
[INFO] iPhone SDK version: 4.3
[INFO] iPhone simulated device: iphone
[INFO] Launching application in Simulator
[INFO] Launched application in Simulator (0.89 seconds)
[INFO] Found 4.3.2 patch installed
[INFO] Application started
[INFO] testing11/1.0 (1.8.0.1.fbdc96f)
[INFO] Application started
[INFO] testing11/1.0 (1.8.0.1.fbdc96f)
[INFO] The current picker value is: Mon Dec 26 2011 02:57:36 GMT+0000 (GMT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment