wintercms / wintercms/winter

Disabled nestedform datepicker

Open
#1,408 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.5k
Forks
246
Avg merge
19h 2m
Merged PRs (30d)
7

Description

Winter CMS Build

dev-develop

PHP Version

8.4

Database engine

MySQL/MariaDB

Plugins installed

No response

Issue description

Hello

I found a small bug.
When using a disabled nestedform field in combination with a datepicker

The updated_at shows the datepicker form, but the created_at in the configuration object renders a string.
This only occurs when the nestedform is disabled. If the nestedform is enabled, but the created_at disabled, it renders the datepicker form as expected.

Image
Steps to replicate
fields:
    updated_at:
        tab: Ontwerp
        label: Updated at
        type: datepicker
        disabled: true

    configuration:
          tab: Ontwerp
          type: nestedform
          usePanelStyles: false
          disabled: true
          trigger:
              action: hide
              field: approved_status
              condition: value[canceled]
          form:
              fields:
    
                  created_at:
                      label: Original created at
                      type: datepicker
Workaround

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how disabled nestedform fields render their nested datepicker controls, comparing the disabled nestedform case with an enabled nestedform containing a disabled created_at field. Reproduce the configuration from the issue and verify that created_at renders as a datepicker rather than a string, while updated_at remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.