DateTime with alwaysVisible and input shown

DateTime with alwaysVisible and input shown

Loren MaxwellLoren Maxwell Posts: 460Questions: 111Answers: 10

Apologies upfront -- I've created tests cases in live.datatables.net in the past, but never with Editor and I cannot get it to work. I get a console error indicating DataTable.Editor() does not exist.

At any rate, with DataTime alwaysVisible: true and the input visible (i.e., not hidden), selecting a date on the calendar updates the input but does not update the calendar itself. When the input is hidden is works as expected.

Also the submission from Editor is correct since I assume it's taken from the input.

But visibly it looks to the user that selecting a date via the calendar made no difference.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 65,162Questions: 1Answers: 10,796 Site admin

    Hi Loren,

    Could you clarify how your example is different from this one: https://editor.datatables.net/examples/dates/options-always-visible.html ?

    Allan

  • Loren MaxwellLoren Maxwell Posts: 460Questions: 111Answers: 10

    Thanks, @allan -- I just remove this line:

                attr: {
                    type: 'hidden'
                },
    

    And then I have both the input and the calendar.

  • Loren MaxwellLoren Maxwell Posts: 460Questions: 111Answers: 10
    edited September 27

    It just doesn't move the selected class over to the correct date when the calendar is clicked and the input is shown.

  • Loren MaxwellLoren Maxwell Posts: 460Questions: 111Answers: 10

    Morning, @allan -- just following up to see if you were able to duplicate this or had time to investigate.

  • allanallan Posts: 65,162Questions: 1Answers: 10,796 Site admin
    Answer ✓

    Hi,

    I've finally had a bit of time to look into it today, and found the problem. Normally, at the point of picking the calendar would disappear, therefore it didn't need to be redrawn. In this case, that isn't true, it does need to be redrawn, but it wasn't! I've committed a fix to address that error.

    Allan

  • Loren MaxwellLoren Maxwell Posts: 460Questions: 111Answers: 10

    Thanks, @allan -- you're the best!

Sign In or Register to comment.