Premium support for our pure JavaScript UI components


Post by bpepers »

When you set date and minDate on a datePicker, you aren't able to select the date you set as date. I've attached a recording of the issue on the DateField Live Demo.

Attachments
Screen Recording 2022-09-12 at 10.56.56.mov
(15.12 MiB) Downloaded 33 times

Post by tasnim »

Hi,
The date picker did select the date provided, so it won't trigger select event again when already selected value clicked. minDate (https://www.bryntum.com/docs/grid/api/Core/widget/DateField#config-min) and date (https://www.bryntum.com/docs/grid/api/Core/widget/DateField#config-value) configs should be defined for the date field itself.

Good Luck :),
Tasnim


Post by bpepers »

If we set the value on the dateField this will put the value in the cell right?
The behaviour we want is for the date picker to open on the min date when editing as by default it opens on Todays date but this isn't selectable if the min date is after it but we don't want to put a value in the cell unless it is selected.
We thought we could achieve this by setting date on the picker which seems to work however you can't actually select that date.
Is there a config we can set to get this functionality?


Post by mats »


Post by bpepers »

Its related, that issue is caused by the date picker opening at the current date and it not allowing you to move the months if it is before the min date. Ideally it would just open at the min date anyway as this is the earliest date you can actually select and then you wouldn't run into that issue.


Post by alex.l »

Not configurable now, but that makes sense to add this https://github.com/bryntum/support/issues/5222
Meanwhile try to use date instead of value in picker config:

picker : { date : new Date('2011-01-12') },

All the best,
Alex


Post by bpepers »

Hi, I just tried using date and it seems like it has the same issue as setting value. See attached recording

Attachments
Screen Recording 2022-09-13 at 12.29.21.mov
(14.2 MiB) Downloaded 31 times

Post by alex.l »

that's ridiculous, but if I define dates like this

min : new Date('2018-04-18'),
picker : {date : new Date('2018-04-18')},

That works great. This is that I actually tested before reply to you. Please see video attached.
I will mention this moment in the ticket I've created. I cannot open a bug for this, because it's not public API, just a workaround, but we will check that too.

Attachments
Screen Recording 2022-09-13 at 14.34.29.mov
(3.33 MiB) Downloaded 33 times

All the best,
Alex


Post Reply