HI,
are you using DatePicker or DatePickerDialog?
For the former
SetTextColor("#ff0000") doesn't work
there are other methods.
SetBackColor("#ff0000") works
SetDividerColor, SetDescription,
Not sure of parameter format for SetFirstDayOfWeek
Regards, Alan H
app.LoadPlugin( "UIExtras" )
var str, picker
function OnStart() {
lay = app.CreateLayout( "Linear", "VCenter,FillXY" )
uix = app.CreateUIExtras()
picker = uix.CreateDatePicker( 2016, 0, 1, "Calendar" )
picker.SetTextColor("#ff0000")
picker.SetMinDate(2025,12,3)
picker.SetMaxDate(2025,12,25)
picker.SetOnDateChanged( OnDateChanged )
picker.SetBackColor("#ff0000")
picker.SetDividerColor("#ffff00")
picker.SetDescription("Please pick a date")
picker.SetPadding(5,19,15,20,"px")
picker.SetFirstDayOfWeek(3)
lay.AddChild( picker )
app.AddLayout( lay )
meta("Date Picker",picker)
alert(str)
alert(JSON.stringify(picker.plg))
alert(JSON.stringify(picker.plg.data))
alert(JSON.stringify(picker.data))
}
function OnDateChanged( year, month, day ) {
var date = new Date()
date.setFullYear( year, month, day)
app.ShowPopup( date.toDateString() )
}
function meta (nme,object) {
gbl = nme
gopn = Object.getOwnPropertyNames(object)
gopn = JSON.stringify(gopn)
gopn = gopn.replace("[","")
gopn = gopn.replace("]","")
gopn = gopn.replace(/"/g,'')
arr = gopn.split(",")
arr.sort()
arr.forEach(myFunction);
}
function myFunction(item) {
str+=item+"\n"+eval("picker."+item)+"\n\n"
}
//