Skip to content

Plugin is truncating the time value from the initial datetime value from the text field #750

Closed
@kasulachetu

Description

@kasulachetu

I am running to issues with adding value attribute to the input field. If I set the value attribute on the input field, the timepicker is not displaying the value in the input field, but it reads the value for the timepicker. See the example code on jsfiddle: http://jsfiddle.net/kasulachetu/7fug98m3/3/

HTML:

<input type="text" name="start_date" id="start_date" value="21 Aug 2014 01:00" />
<input type="text" name="end_date" id="end_date" value="25 Aug 2014 01:00" />

jQuery:

var startDate = $("#start_date"),
endDate = $("#end_date");
$.timepicker.datetimeRange(
    startDate,
    endDate,
    {
      minInterval: (1000*60*60),
      dateFormat: 'dd M yy', 
      timeFormat: 'HH:mm',
      start: {}, // start picker options
      end: {} // end picker options                 
    }
);

How can I fix it?

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