Skip to main content
Solved

How to Select a Date in WebUI

  • March 8, 2021
  • 6 replies
  • 134 views

Forum|alt.badge.img
  • AIMMS Partner
  • 9 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?

Best answer by Chris Kuip

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

6 replies

Chris Kuip
AIMMSian
Forum|alt.badge.img+7
  • AIMMSian
  • 125 replies
  • March 10, 2021

Hi Roy,

Is this what you are looking for?

With kind regards,

Chris

 


Forum|alt.badge.img
  • Author
  • AIMMS Partner
  • 9 replies
  • March 11, 2021

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.


Chris Kuip
AIMMSian
Forum|alt.badge.img+7
  • AIMMSian
  • 125 replies
  • Answer
  • March 11, 2021

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


Andrew
  • Former AIMMSian
  • 50 replies
  • March 16, 2021

Hi @roy 

Did Chris’s answer help you with your problem?

Thanks


Forum|alt.badge.img
  • Author
  • AIMMS Partner
  • 9 replies
  • March 16, 2021

Hi @roy 

Did Chris’s answer help you with your problem?

Thanks

Yes @Andrew.


Forum|alt.badge.img
  • Author
  • AIMMS Partner
  • 9 replies
  • March 16, 2021

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.



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

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