decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

datetime widget time picker does not accept any valid input

Open HastingsEngineering opened this issue 1 year ago • 2 comments
trafficstars

Describe the bug The datetime widget in time picker mode does not accept any valid input

To Reproduce

  1. Create a datetime widget with time_format=true
  2. Try to type in a time

The hours field should fill in, then upon entering the next digit, the whole widget clears

Expected behavior You should be able to enter a time

Screenshots Example trying to enter the time 05:30

Input: "05" image

Input: "053" image

Applicable Versions: decap-cms-app 3.1.10 decap-cms-core 3.3.6 decap-cms 3.1.10

  • Git Provider: Gitlab
  • OS: Win10
  • Firefox

CMS configuration

backend:
  name: git-gateway
  branch: main

site_url: redacted

publish_mode: editorial_workflow

# Media
media_folder: static/assets/uploads
public_folder: /assets/uploads

# File Routes
collections:     
  - label: Events
    label_singular: Event
    name: events
    folder: src/lib/site/pages/events
    path: "{{slug}}"
    slug: "{{slug}}"
    preview_path: "events/{{slug}}"
    create: true
    editor:
      preview: false
    fields:
      - label: Layout
        name: layout
        widget: hidden
        default: blocks
      - label: Title
        name: title
        widget: string
        hint: Sets the page title in browsers and search engines
      - label: Description
        name: description
        widget: text
        hint: Gives the page a description in SEO for search engines
      - label: Start Date
        name: startDate
        widget: datetime
        date_format: YYYY-MM-DD
        picker_utc: true
      - label: End Date
        name: endDate
        widget: datetime
        date_format: YYYY-MM-DD
        required: false
        picker_utc: true
        default: ""
      - label: Start Time
        name: startTime
        widget: datetime
        time_format: true
        required: false
        picker_utc: true
        default: ""
      - label: End Time
        name: endTime
        widget: datetime
        time_format: true
        required: false
        picker_utc: true
        default: ""
      - label: All Day?
        name: allDay
        widget: boolean
        hint: If set, events will not display a time.
        default: false
      - label: Tags
        name: tags
        widget: list

HastingsEngineering avatar May 23 '24 06:05 HastingsEngineering

Same here... cdn 3.1.10 - { label: 'Datetime', name: 'datetime', widget: 'datetime' } This works correctly. - { label: 'Datetime', name: 'datetime', widget: 'datetime', format: 'LT', time_format: 'hh:mm A'} This does not.

fernan2jr avatar Jun 10 '24 20:06 fernan2jr

@HastingsEngineering @fernan2jr this was addressed in #7261 and released in 3.3.0. Can you test it and let me know if it works for you now?

martinjagodic avatar Aug 12 '24 09:08 martinjagodic