1

We are using the Sencha Ext JS framework version 7.2 and modern toolkit. And for this specific toolkit and version, we don't have the month picker enabled for this component.

We tried to do some overrides to make it possible, but we didn't have success on that.

So, do you guys know how we can do that or if someone already did some similar?

Nimantha
  • 6,405
  • 6
  • 28
  • 69
  • May you provide some fiddle sample? – Arthur Rubens Mar 18 '21 at 20:46
  • Hello Arthur, we have this following fiddle: https://fiddle.sencha.com/#fiddle/32j4&view/editor Just change to the Triton theme. Also, my coworker possibly found a solution. He will provide soon the solution. Thanks for your help! – Renato Carvalho Mar 19 '21 at 13:27
  • Month or Year picker? Looks like it is nor implemented in material design of the modern toolkit. – Arthur Rubens Mar 19 '21 at 18:39
  • 1
    Month and triton theme of the modern toolkit. Yes, it is not implemented. But we manage to build an override. My coworker will post a solution here soon. Thanks for your help Arthur! – Renato Carvalho Mar 21 '21 at 21:35

1 Answers1

1

We were able to apply the month picker using an override that we found on the following link:

https://github.com/mitchellsimoens/extjs-date-picker/blob/master/overrides/panel/Date.js

Basically the code on the link above is creating the month picker using a dataview and the override is applying the month picker created on the existing date component.

To apply that you need to create the Date.js override file on the override folder that is configured in you ExtJS application and also you will need to create the month picker component as you can find on src/ folder on the link above inside the app/ folder in your project.

In a new local project this override have worked without any changes on the code, but in our project we had an error with the toolCt variable that was undefined, so we changed the line 83:

const toolCt = this.toolCt;

to be like:

toolCt = this.query()[0];

We also had some issues with the position of the month picker when displayed on minimized screen, that we handled using the responsive configuration on ExtJS. Basically when the screen is smaller then the date picker height we are changing the date component to a mobile version.

Dharman
  • 30,962
  • 25
  • 85
  • 135