Page 1 of 1

Ability to choose month on calendar

Posted: Fri Dec 02, 2022 10:16 am
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


Re: Ability to choose month on calendar

Posted: Fri Dec 02, 2022 11:50 am
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


Re: Ability to choose month on calendar

Posted: Fri Dec 16, 2022 2:16 pm
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


Re: Ability to choose month on calendar

Posted: Fri Dec 16, 2022 2:42 pm
by tasnim

You could disable the yearButton like this


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


Re: Ability to choose month on calendar

Posted: Fri Dec 16, 2022 3:10 pm
by tornikezhizh

it helped, thank you


Re: Ability to choose month on calendar

Posted: Fri Dec 16, 2022 5:24 pm
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 544 times

Re: Ability to choose month on calendar

Posted: Fri Dec 16, 2022 5:27 pm
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


Re: Ability to choose month on calendar

Posted: Fri Dec 16, 2022 6:18 pm
by Animal

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