How can i set datepicker form value

I created datepicker widget in form with dependsOn option. In filterField i want to set value for this field.

$fields->datado->value = ‘2024-09-16 10:30:38’;

this line doensnt update field value.

Also i can read $fields->datado->value. So field name is set corretly.

For text field type it works.

Hi @mkinternet ,

I just tested the following code:

public function filterFields($fields, $context) {
    $fields->published_at->value = '2024-09-16 10:30:38';
}

The value is shown correctly:

image

Doesnt work on OC1. Which version did you tested?

Hi @mkinternet,

I tested this on the latest version, 3.6.30.

Here are some upgrade guides:

Right now i cannot update OC to newest version. Im working on it :grinning:

I found issue dependsOn not working for datepicker with time format · Issue #4268 · octobercms/october · GitHub

and fix: Trigger "change" event when time picker is changed · octobercms/october@1283121 · GitHub

But id didnt help for me.