Our powerful JS Calendar component


Post by tornikezhizh »

Hello, is it possible to choose month by clicking month name on left sided calendar? click month and then month list appears and you choose desired month

Attachments
2.png
2.png (200.98 KiB) Viewed 794 times
1.png
1.png (32.1 KiB) Viewed 794 times

Post by tasnim »

Hi, tornikezhizh,
Sure, it's possible. You could just add this code inside of calendar config

    datePicker : {
        editMonth : true
    }

And you'll be good to go

Attachments
chrome_Bd49mZHmnn.gif
chrome_Bd49mZHmnn.gif (215.32 KiB) Viewed 784 times

Post by tornikezhizh »

thank you, is there any option to disable year selecting? now with editMonth = true, I can select years also, I would prefer not to make years selectable


Post by tasnim »

You could disable the yearButton like this


calendar.datePicker.tbar.widgetMap.yearButton.disabled = true


Post by tornikezhizh »

it helped, thank you


Post by Animal »

To make this easier, I have proposed the following new config for DatePicker widgets so you can just configure this right into your Calendar instead if having to inject the settings after creation.

Hopefully, I get get approval for this new API which will supersede the editMonth setting:

Screenshot 2022-12-16 at 16.22.13.png
Screenshot 2022-12-16 at 16.22.13.png (185.93 KiB) Viewed 471 times

Post by tornikezhizh »

it would be better, but for I can't find it in documentation, probably you want to make it possible in future right? currently it is not available


Post by Animal »

As I said, it's an API proposal for now. I'm hopeful of getting approval for it.


Post Reply