Is that a way to Pop-up a calendar to let user chose a date?


Yang Ghua

hi every ones:)
I want to let user to select a date value,can i Pop-up a calendar ?


DecSoft

Hello Joshua,

Although is possible to deal with the Bootstrap CSS framework's datepicker (see this app sample DatePicker.ab) currently this kind of control is not available "out-of-the-box" in App Builder. However, maybe you want to take a look at the "Datetime" sample included in AB: we can always use some Select controls in order to prepare a date picker, and, in fact, probably this is a good aproach if our application is intended for mobile (small screens) devices.



Yang Ghua

Hi David,I know you will be here at this time,Thanks,I will look into it!
^_^


DecSoft

Hello Joshua,

Hi David,I know you will be here at this time,Thanks,I will look into it!
^_^

Always at your service! And I want to add one thing more... remember we can show app's views as modal dialogs using the "ShowDialog" action. So the Select controls to conform a datepicker can perfectly be put into an specific app's view in order to be shown as a dialog. Of course this is optional, and, can be good in certain scenarios, but not always, in the sense that also "normal" views (non modal) can have specific stuff (a datepicker) to be shown when we wanted.

Anyway it's an idea! ;)



Yang Ghua

the DatePicker.ab seems only can pick the date >=current date?
and can i set the date format??

:cool


DecSoft

Hello Joshua,

the DatePicker.ab seems only can pick the date >=current date?
and can i set the date format??

:cool

You can start with this Datepicker documentation. Remember this controls doesn't exists "out-of-the-box" in App Builder. My recomendation is to use some Select controls: more easy, full supported and usable in small and larger screens!



Yang Ghua

I am just doing some test ,and this test is for pad,so the size would not be a problem

and this website:angular-ui.github.io ,contain a lot of information about JS,nice to study

can I get this 'Bootstrap CSS framework' in my AB project,and later build into a Cordova application?


DecSoft

Hello Joshua,

Yes; in fact App Builder already includes that Javascript stuff, and use it "out-of-the-box" in various controls. But not all, like the Datepicker control. So you can always try with the HTML control, but don't worry about include the Javascript stuff, since they are already included in AB. If you have ANY further question, please, don't hesitate to post here sir.



DecSoft

Hello Joshua,

Take a look if you like at the new Date input control available in App Builder. You can start by the also new DateInput app sample. The below one is a sample of the datepicker that Android 6.1 offer to us to choose a date using the new Date input:



Yang Ghua

....I just want to say:You are really efficient
Thanks for the work

:) and =)


Yang Ghua

try the Date input sample
can I set a Javascript Date back to String ,like:
Thu Oct 13 2016 00:00:00 GMT+0800 -> 2016-10-13


DecSoft

Hello Joshua,

Thanks for your kindly words. About your question, the Date input control requires a JS Date variable to be binded. This is does automatically by App Builder. If we need to play with the JS Date variable (the Date input value) we can first create a new AB Data variable with "NewDate" using the input's value.

Then, once we have an AB Data variable we can use actions like DateFormat with that variable.

Probably we can use also another approach (depend on your needs) like a bit of Javascript code, in order to do something like that:

Remember the "Value" is a JS Date variable, so we can also use another Date Javascript stuff if we wanted (if we must use the input's value from Javascript code). So take a look and tell me if you have any further question Joshua.



Yang Ghua

This can work:
add a js file

in AB


DecSoft

Hello Joshua,

But remember we have the DateFormat action. We can do something like this:



Yang Ghua

Oh,I get that,
I just try some js in AB,to help me learn it through

DateFormat action ,of course ,more convenient!


DecSoft

Hello Joshua,

Oh,I get that,
I just try some js in AB,to help me learn it through

DateFormat action ,of course ,more convenient!

Learn is good. Dot. And it's good to know different usages/alternatives. :)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.