Replies: 4 comments
-
Of course, I can imagine how this can be done, I will answer in more detail tomorrow. |
Beta Was this translation helpful? Give feedback.
-
I think I've found something now. But maybe you have a better solution, also for the function "chkNextPrev".
|
Beta Was this translation helpful? Give feedback.
-
Test 1
Test 2 Also, if you want to handle arrow clicks, there is a built-in option for that. You don't need to create your own event handler. For more details, check out the documentation on the site.
But if you really need your own arrow click handler, use event delegation. The option where you add your own event handler for each button is completely not optimal. This advice does not apply to the plugin, but I think it will be useful to you in life.
Use this:
|
Beta Was this translation helpful? Give feedback.
-
Super and many thanks for the information.
I react not only to the arrows, but also to the changes of month and year. A few minor adjustments to the function and it should now work. |
Beta Was this translation helpful? Give feedback.
-
I really like the calendar with its many functions and would like to use it as a booking calendar. However, I still have a problem with the buttons for "Prev" and "Next" for the "Multiple" type.
For better visualisation I have it in jsfiddle: https://jsfiddle.net/LukasHH/d46ajc8y/
Test 1
With the standard layout for Multiple, the buttons are displayed outside the months if the total width is greater than the months to be displayed.
Test 2
I have designed the layout so that the buttons are always in the header. It should not be possible to go back in the months or only until the current month is in the last element. The "Prev" button should be hidden for the current and older months. Unfortunately, this only works for the first month to be displayed.
I have created a JS script that reacts to the events (click prev or next) and hides or shows the respective Prev button. This works as long as you don't click on the buttons to select the month or year. As soon as you have clicked on the month or year, my JS no longer reacts.
Do you have any idea how I can do this?
Beta Was this translation helpful? Give feedback.
All reactions