- 🇭🇺Hungary nagy.balint
Hi!
Thanks!
However I think that in this case an abstract parent class would be better.
As traits are more for situations where the code would be reused in several different places, like the translation trait.
But here the code that is reused is for widgets only, and to make different type of flatpickr widgets. - last update
over 1 year ago 2 pass - last update
over 1 year ago 2 pass - Status changed to Needs review
over 1 year ago 4:00pm 12 May 2023 - 🇷🇴Romania vasike Ramnicu Valcea
@nagy.balint i wished to use an WidgetBase ... if PHP allows to have multiple inheritance
The issue here as this separate inputs is based on
DateRangeWidgetBase
which actually uses 2 inputs ... instead of one.class DateTimeRangeSeparateInputsFlatPickrWidget extends DateRangeWidgetBase
So for now i just update the MR ... with the module updates- solving conflicts.
- 🇭🇺Hungary nagy.balint
I added two commits, but it is only tests, so should not conflict, but i cannot rebase the branch for some reason in gitlab.
Not sure if it is a gitlab issue.
- last update
over 1 year ago 4 pass - 🇷🇴Romania vasike Ramnicu Valcea
@nagy.balint ... no idea why ... i could rebase locally and push without conflicts .... maybe it's something about gitlab and d.o issues forks ...
- 🇭🇺Hungary nagy.balint
Nice!
It is good that the new tests are still fine here.
However, would it be possible to fix the coding standards messages that the testbot provides?
https://www.drupal.org/pift-ci-job/2668052 → - last update
over 1 year ago 4 pass - last update
over 1 year ago 4 pass - 🇷🇴Romania vasike Ramnicu Valcea
@nagy.balint updates for CS fixes.
However there's still one issue about doc comment
* Plugin implementation of the 'datetime_range_separate_inputs_flatpickr' widget.
Which has the same "format" with all other widgets doc comments.Any suggestion which is the best way the "adapt" this text.
- 🇭🇺Hungary nagy.balint
Yes it seems usually the id is not this long, but we can likely just put the "widget." word into the next line.
- 🇭🇺Hungary nagy.balint
I could be wrong but as far as I see we don't need to use the trait again in DateTimeRangeFlatPickrWidget
since it is inheriting the trait from DateTimeFlatPickrWidgetAnd at fieldSettingsFinalNullCleanType we can still call parent as before, as that will call the parent's class method which came from the trait.
- last update
over 1 year ago 4 pass - 🇷🇴Romania vasike Ramnicu Valcea
@nagy.balint good catch ... no idea why "i insisted" with bringing the trait also in the "child" ...
About the doc comment ... i changed a little ... as for new line, it want an extra empty line between comments ... which is quite odd ...
let's see if it's still passes
- 🇭🇺Hungary nagy.balint
I checked and seems to be good.
We just need to alter the css a bit like
.field--widget-datetime-range-flatpickr .form-item, .field--widget-datetime-flatpickr .form-item, .field--widget-datetime-range-separate-inputs-flatpickr div.form-item { background: url("../images/calendar.svg") no-repeat left bottom; background-size: 20px 20px; } .field--widget-datetime-range-flatpickr .form-item input, .field--widget-datetime-flatpickr .form-item input, .field--widget-datetime-range-separate-inputs-flatpickr div.form-item input { margin-left: 25px; }
So the calendar icons are added to the separate inputs as well.
- last update
over 1 year ago 4 pass - 🇷🇴Romania vasike Ramnicu Valcea
@nagy.balint updated as suggested ... thank you
Bonus: for the same day options do not display the calendar icon for the end data (time) input. -
nagy.balint →
committed 76cd9a77 on 2.0.x authored by
vasike →
Issue #3311356 by vasike, nagy.balint: Datetime range widget with...
-
nagy.balint →
committed 76cd9a77 on 2.0.x authored by
vasike →
- Status changed to Fixed
over 1 year ago 11:46am 18 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- 🇭🇺Hungary nagy.balint
Unfortunately the separate input widget does not work properly when the field is kept empty, as the validation fails.
Also I think it should not check with >= as then when the date is the exact same it will throw a validation error. - Status changed to Needs review
over 1 year ago 10:32am 10 July 2023 - last update
over 1 year ago 4 pass -
nagy.balint →
committed c36a6c82 on 2.0.x
Issue #3311356 by nagy.balint: Issue with Datetime range widget when...
-
nagy.balint →
committed c36a6c82 on 2.0.x
- Status changed to Fixed
over 1 year ago 10:49am 10 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.