Page 1 of 1
Open Calender with y,m,d
Posted: Fri Feb 02, 2018 4:26 pm
by toms
Hi,
There is a function
and
Code: Select all
function nuPopulateCalendar(id, y, m, d)
Is it possible to kind of combine these two functions so I can pass y, m, d and specify the target (element/field)?
How about adding some additional, optional parameters
y, m, d to the nuPopupCalendar(pThis) function?
Code: Select all
function nuPopupCalendar(pThis, y, m, d)
Re: Open Calender with y,m,d
Posted: Sat Feb 03, 2018 6:27 pm
by admin
toms,
I don't quite get what you are saying.
Can you explain what you are trying to do?
Steven
Re: Open Calender with y,m,d
Posted: Sat Feb 03, 2018 7:29 pm
by toms
In a subform grid, dates can be entered (using the calender popup)
As you see on the screenshot, 2018-07-19 has been picked in the first row/cell. When clicking the next row, the calender pops up again with the current month (Febrary 2018).
Since I will choose a later date than 2018-07-19, I need to navigate through all the months again to get to the desired date. And so on and so forth...
My idea was to intercept the onclick event that calls nuPopupCalendar(this) and pass a custom date to the calender.
To do so, I would need a function nuPopupCalendar(this,y,m,d) that takes (optional)/additional parameters (year/month/date) to open the calender in another date than today.
I hope it's more or less clear what I want to do...
calendar.PNG
Re: Open Calender with y,m,d
Posted: Sat Feb 03, 2018 8:12 pm
by toms
I got It working by adding an additional parameter d (date) to the function nuPopupCalendar();
This allows me to pass a custom date to the function. E,g, nuPopupCalendar(this,'2018-10-07';)
nuPopupCalendar_Param_d.png
Feel free to add it to github.
Re: Open Calender with y,m,d
Posted: Mon Feb 05, 2018 4:05 am
by admin
toms,
That is now on Github.
Please test it.
Steven
Re: Open Calender with y,m,d
Posted: Mon Feb 05, 2018 5:43 am
by toms
Steven,
It works as expected, thanks!
Re: Open Calender with y,m,d
Posted: Mon Feb 05, 2018 9:35 am
by admin
.