Skip to content

Time Format when editing #37

@webbtj

Description

@webbtj

Sorry, this is more of a support issue than a bug (though maybe it's a bug with the docs?).

I have a datetime_picker field working perfectly for creating. I get the format I want with no issues. What I'm struggling with is editing that same model. When editing a model with the datetime_picker field it's populating the field with a different format specifically, it is including seconds and milliseconds (which I'm going to assume is the default date format in Rails -- still kinda new and haven't changed that on this project). Once I click the field to edit it and pick a new date/time it again displays the date in the format I have chosen, I just don't want my users to see this seconds/milliseconds display. Any suggestions?

In my edit view:
<%= f.datetime_picker :starts_at, :stepMinute => 15, :dateFormat => "yy-mm-dd", placeholder: "Start Date & Time" %>

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