October: dependsOn not working for datepicker with time format

Created on 18 Apr 2019  路  9Comments  路  Source: octobercms/october

  • OctoberCMS Build: 451
  • PHP Version: 7.1

Description:

When having a form with a datepicker field in time mode, other fields that depend on that field by the dependsOn configuration, don't update.

The same is happening for datetime fields, but then it only updates on changing the date.

Steps To Reproduce:

Create a form like this:

field1:
    type: datepicker
    mode: time

field2:
    type: datepicker
    mode: time
    dependsOn: field1

Changing the time in field 1 doesn't trigger the filterFields method.

Completed Bug

Most helpful comment

Fixed by 128312106955d894528d448700f1fc66792b7826. Please let us know if there's any further problems.

All 9 comments

I can confirm this bug.
It happens for mode: time and mode: datetime too for the time part of the widget.

I just ran into this issue as well, it looks like the event from the time picker doesn't bubble up to the div used in fieldElements in october.form.js, though it does bubble up properly in the date picker.

Ideally the behavior should be that the change doesn't fire until both date and time have been chosen in datetime mode (currently the value is the chosen date with the current time when just the date has been filled in).

I'm not sure where this is coming from, there don't seem to be any events that would stop propagation.

Are there any updates on this issue? I did try to look into the root cause but I'm not well-versed enough with the JS running the backend to wrap my mind around what's happening there.

If the issue stems from the library being used for the time picker I'd be happy to open up an issue or even submit a PR there but I just can't tell where the root cause is.

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.

I missed the first bot post, can we get this opened back up?

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.

Still hoping to get this resolved at some point, but maybe this needs to be reopened in the forked repo

@evanlihou fork's no longer happening, we'll address it in this repo

Fixed by 128312106955d894528d448700f1fc66792b7826. Please let us know if there's any further problems.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oppin picture oppin  路  3Comments

jvanremoortere picture jvanremoortere  路  3Comments

EbashuOnHolidays picture EbashuOnHolidays  路  3Comments

lukaszbanas-extremecoding picture lukaszbanas-extremecoding  路  3Comments

m49n picture m49n  路  3Comments