Solved

How to Select a Date in WebUI

  • 8 March 2021
  • 6 replies
  • 63 views

Badge
  • Enthusiast
  • 7 replies

I have a String parameter for BeginDateofCalendar which takes a string of date.

I created a procedure for getting value for the above string parameter using DialogGetDate which gives me option to select a date from Calendar.

But it only working in WinUI

When i am running the procedure in a page in WebUI its running but the calendar is opening in AIMMS App, not in WebUI.

what should i do so that the calendar opens in WebUI and not in AIMMS App?

icon

Best answer by Chris Kuip 11 March 2021, 15:50

Hi Roy,

To be honest, there is no direct equivalent of DialogGetDate in the WebUI. In the WebUI, it is possible to get an element in a calendar, and this calendar element can be specific up to a minute. You can convert an element to a string easily using formatString. For instance as follows:

sp_someDay := formatString("%e”, ep_someDay);

More elaborate conversions between element and string can be done using StringToTimeslot and TimeslotToString not illustrated here.

Please find enclosed an example AIMMS project for selecting(in sequence):

  1. A date 
  2. A date/time

The dialogs presented in here can be found by hovering over the value of ep_someDay or ep_someMinute and selecting the small calendar icon that appears.

Please let me know if this answers your question.

With kind regards,

Chris

View original

6 replies

Userlevel 4

Hi Roy,

Is this what you are looking for?

With kind regards,

Chris

 

Badge

Hi Roy,

Is this what you are looking for?

With kind regards,

Chris

 

Yes I am looking for that. I saw that page earlier. But That page has no information  how to implement it.

Userlevel 4

Hi Roy,

To be honest, there is no direct equivalent of DialogGetDate in the WebUI. In the WebUI, it is possible to get an element in a calendar, and this calendar element can be specific up to a minute. You can convert an element to a string easily using formatString. For instance as follows:

sp_someDay := formatString("%e”, ep_someDay);

More elaborate conversions between element and string can be done using StringToTimeslot and TimeslotToString not illustrated here.

Please find enclosed an example AIMMS project for selecting(in sequence):

  1. A date 
  2. A date/time

The dialogs presented in here can be found by hovering over the value of ep_someDay or ep_someMinute and selecting the small calendar icon that appears.

Please let me know if this answers your question.

With kind regards,

Chris

Hi @roy 

Did Chris’s answer help you with your problem?

Thanks

Badge

Hi @roy 

Did Chris’s answer help you with your problem?

Thanks

Yes @Andrew.

Badge

Hi Roy,

To be honest, there is no direct equivalent of DialogGetDate in the WebUI. In the WebUI, it is possible to get an element in a calendar, and this calendar element can be specific up to a minute. You can convert an element to a string easily using formatString. For instance as follows:

sp_someDay := formatString("%e”, ep_someDay);

More elaborate conversions between element and string can be done using StringToTimeslot and TimeslotToString not illustrated here.

Please find enclosed an example AIMMS project for selecting(in sequence):

  1. A date 
  2. A date/time

The dialogs presented in here can be found by hovering over the value of ep_someDay or ep_someMinute and selecting the small calendar icon that appears.

Please let me know if this answers your question.

With kind regards,

Chris

Thanks @Chris Kuip for the help.

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator