Calendar adding in the app

114 views
Skip to first unread message

DogPlanner GSS

unread,
Nov 28, 2025, 5:21:24 AM11/28/25
to DroidScript
Hello,

We want to add the calendar in our new app for pets which we are developing now using DroidScript app. 

Could anyone help us with this issue? 

We didn't find the info about this.

Thank you very much in advance.


Fatih Elitas

unread,
Nov 29, 2025, 1:52:30 AM11/29/25
to DroidScript
Hello.
I do this using the uiextras plugin

app.LoadPlugin( "UIExtras" );

function OnStart()
{
 lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
 
 btn = app.CreateButton( "Pick Date", 0.3, 0.1 );
 btn.SetOnTouch( btn_OnTouch );
 lay.AddChild( btn );

 app.AddLayout( lay );

 uix = app.CreateUIExtras();
}

function btn_OnTouch()
{
 picker = uix.CreateDatePickerDialog( "Pick a Date" );
 picker.SetOnOk( picker_OnOk );
 picker.Show();
}

function picker_OnOk( year, month, day )
{
 var date = new Date();
 date.setFullYear( year, month, day);

 app.ShowPopup( date.toDateString() );
}

28 Kasım 2025 Cuma tarihinde saat 13:21:24 UTC+3 itibarıyla dogplan...@gmail.com şunları yazdı:

DogPlanner GSS

unread,
Dec 10, 2025, 4:48:51 AM12/10/25
to DroidScript
Dear Fatih,

Thank you very much for your answer! 
It is very useful for me and we will make my app with this plugin now!
We will use this functionality for selecting e.g. birth dates of our pets in the app (or another dates for remninders).

One more question about the calendar:
how can we display a calendar with months, weeks on the screen so that dates will be marked for clarity?
It would be interested to know if this can be done in JS rather then HTML.

Thank you very much in advance.

суббота, 29 ноября 2025 г. в 09:52:30 UTC+3, Fatih Elitas:

Alan Hendry

unread,
Dec 14, 2025, 7:54:48 AM12/14/25
to DroidScript
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"
}




//

Alan Hendry

unread,
Dec 14, 2025, 2:53:27 PM12/14/25
to DroidScript
P.S. CreateDatePicker, SetMinDate, SetMaxDate
use month 0 to 11.
 picker.SetMinDate(2025,11,3)
 picker.SetMaxDate(2025,11,25)

DogPlanner GSS

unread,
Dec 15, 2025, 6:13:56 AM12/15/25
to DroidScript
Dear Alan,

thank you very much for your answer! It works.

Have a nice day.

Best regards,
Dmitry

воскресенье, 14 декабря 2025 г. в 22:53:27 UTC+3, hendr...@gmail.com:
Reply all
Reply to author
Forward
0 new messages