Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time picker not working in editorShape date fields #5

Open
ruban258 opened this issue Dec 31, 2024 · 1 comment
Open

Time picker not working in editorShape date fields #5

ruban258 opened this issue Dec 31, 2024 · 1 comment

Comments

@ruban258
Copy link

I'm encountering an issue with the time picker functionality in the editorShape configuration. When trying to edit task dates, the time selection option is not appearing despite following the documentation.

{
    key: "start",
    type: "date",
    label: "Start date and time",
    config: {
        enableTime: true,
        dateFormat: "Y-m-d H:i",
        time_24hr: true,
        minuteIncrement: 1
    }
}

Expected behavior:

  • Date picker should show time selection options
  • Users should be able to select both date and time for tasks

Actual behavior:

  • Only date selection is available
  • No time picker is displayed

Environment:

  • wx-svelte-gantt 2.0.1
  • Svelte 5
  • Browser: chrome

Steps to reproduce:

  • Create a Gantt chart with editorShape configuration
  • Try to edit a task's start/end date
  • Observe that time selection is not available

I've tried:

Using different date formats

  • Adding various flatpickr configuration options
  • Ensuring all configuration options match the documentation

Would appreciate any guidance on this issue or confirmation if this is a known bug.

@Zwillinge
Copy link

Zwillinge commented Jan 17, 2025

Docs are a bit optimistic as to setting time for date type. Unfortunately, currently there's no ability to insert a timepicker into the built-in editor.

Now you can create a custom dialog and include Timepicker from wx-svelte-core to it
https://github.com/svar-widgets/gantt/blob/main/svelte/demos/cases/GanttForm.svelte
https://docs.svar.dev/svelte/gantt/samples/#/custom-edit-form/willow

Or add type:"text" input to editorShape to enter time manually.

On the positive side, we are preparing an update with a more flexible Editor where it will be possible to insert any kind of controls easily. And your request for duration unit "hour" is registered and is likely to be implemented in one of the next updates as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants