Full calendar display in form
Full calendar display in form
Hi
I expected I could create a form and just set "date picker" to display a specific calendar. Where is the option so the usual calendar table can be displayed? For example month by month with a field for each day?
When I set "date picker" there appear only three pull downs for day, month, year.
Also it should display the already occupied days as set in Calguy Calendar.
Any help appreciated
Thom
I expected I could create a form and just set "date picker" to display a specific calendar. Where is the option so the usual calendar table can be displayed? For example month by month with a field for each day?
When I set "date picker" there appear only three pull downs for day, month, year.
Also it should display the already occupied days as set in Calguy Calendar.
Any help appreciated
Thom
Re: Full calendar display in form
I think more context is needed: what are you using to create the form? (formbuilder, cgbetterforms, straight html, or are you talking about something generated from within the CGCalendar Module?)
A lot of people use jQueryUI for a calendar datepicker:
As for pulling in the booked dates from the CGCalendar module, that will require some Smarty and jQueryUI datepicker API work, unless you are using some sort of booking module that works with CGCalendar.
A lot of people use jQueryUI for a calendar datepicker:
Code: Select all
https://jqueryui.com/datepicker/
Not getting the answer you need? CMSMS support options
Re: Full calendar display in form
My bad, you are right I forgot to mention the main thing, silly me.
Yes, this is in FormBuilder, where I choose "date picker". There seems to be no calender display like "fullcalender" in CGCalendar.
The ideal thing would be just to display a calendar showing occupied days in red and click on an available one and then in a popup put in the reservation data. I suppose this should be done starting with CGCalendar?
Thinking this will be complicated I did what I supposed is the shorter route, showing calendar on top and form with a "date picker", one has to chose a date that is not red on the calendar above.
This is my page http://burgerg9.myhostpoint.ch/reservation.html
Formatting that calendar was a really bigger task then I thought. I had over 10 hours until I was able to remove unwanted space and scrollbar, the event detail link, change the event box color and move it upwards.
I suppose formatting CGcalendar to work as I initially intended would be even much more complicated?
Yes, this is in FormBuilder, where I choose "date picker". There seems to be no calender display like "fullcalender" in CGCalendar.
The ideal thing would be just to display a calendar showing occupied days in red and click on an available one and then in a popup put in the reservation data. I suppose this should be done starting with CGCalendar?
Thinking this will be complicated I did what I supposed is the shorter route, showing calendar on top and form with a "date picker", one has to chose a date that is not red on the calendar above.
This is my page http://burgerg9.myhostpoint.ch/reservation.html
Formatting that calendar was a really bigger task then I thought. I had over 10 hours until I was able to remove unwanted space and scrollbar, the event detail link, change the event box color and move it upwards.
I suppose formatting CGcalendar to work as I initially intended would be even much more complicated?
Re: Full calendar display in form
There's a lot of different ways to go about this, but all require some thought and planning. I would probably modify the form template to use the jqueryui datepicker, then create a cgcalendar template to build the configuration that tells it which days are unavailable. 20 people will give you 20 other solutions though.
Not getting the answer you need? CMSMS support options
Re: Full calendar display in form
Thank you DIGI3, the jQuery UI would be a great way. I let my less elegant solution for now and maybe if I get more time later to work on this and try the jQuery UI.
Planning is always an impossible thing without knowing a module/thing already. One has to first work into it before being able to say how much time it will take. I already got it very wrong with formbuilder and that is one I thought I knew...
Planning is always an impossible thing without knowing a module/thing already. One has to first work into it before being able to say how much time it will take. I already got it very wrong with formbuilder and that is one I thought I knew...
Re: Full calendar display in form
One more thing I struggle with. The CGcalendar in frontend should only show events of one category. I tried
{cms_module module="CGCalendar" category="Forsthaus belegt"}
but still it shows the other category too. The category name matches exactly the category I set in backend. What did I wrong here?
{cms_module module="CGCalendar" category="Forsthaus belegt"}
but still it shows the other category too. The category name matches exactly the category I set in backend. What did I wrong here?
Re: Full calendar display in form
I would try a category without a white space in the name but that's just a guess.
Re: Full calendar display in form
Good idea. But unfortunately "Forsthaus-besetzt" is also not working. If I could find anything to differentiate those other event fields via CSS I could simply hide them, but I don't see how to address them, despite the fact that they look different (they are white on white and cover the day number, but this seems all inline coded).velden wrote:I would try a category without a white space in the name but that's just a guess.
Re: Full calendar display in form
Well, I was able to identify the css element box and make it transparent with opacity 0.3, then I made the event text disappear (.fc-content). I gave the "place occupied" events a red color and the other events white, so the transparent red is still well visible and the white can barely be noted. That solved my problem.
.fc-event {
height: 31px;
width: 36px;
position: absolute;
top: -1px;
opacity: 0.3;
}
.fc-content {
display: none;
}
.fc-event {
height: 31px;
width: 36px;
position: absolute;
top: -1px;
opacity: 0.3;
}
.fc-content {
display: none;
}
Re: Full calendar display in form
Just remembered this:
viewtopic.php?f=7&t=78121
viewtopic.php?f=7&t=78121
Re: Full calendar display in form
Thank you Velden. Right, this still did the trick. Strange I was not able to find that topic before in the forum.velden wrote:Just remembered this:
viewtopic.php?f=7&t=78121