Skip to content

.timepicker altField gets date added #583

Closed
@thomporter

Description

@thomporter

I don't know if this is something I'm doing or a real issue, but here goes... And sorry if it's been posted elsewhere, I searched around a bit and couldn't find anything exactly the same.

I'm trying to use .timepicker() to display the time with am/pm but populate a hidden field with 24 hour format. As soon as I move the sliders on the time picker, the hidden field gets populated with today's date and the time I've chosen, not just the 24 hour time...

Here's my script:

    $(function(){
        $('#start_time_display').timepicker({
            timeFormat: "hh:mm tt",
            altFieldTimeOnly: false,
            altField: '#start_time',
            altFormat: '', // Have tried removing this, no luck
            altTimeFormat:'HH:mm:ss'
        })
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions