wvega / timepicker

A jQuery plugin to enhance standard form input fields helping users to select (or type) times
http://timepicker.co
GNU General Public License v2.0
216 stars 93 forks source link

Custom formatting does not prevent AM and PM designators #85

Closed sonergonul closed 7 years ago

sonergonul commented 7 years ago

Hello

I created this timepicker with HH:mmcustom format in timeformat. Here is my sample code:

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>

and

$(document).ready(function () {
   $('input.timepicker').timepicker({
       timeformat: 'HH:mm'
       });
});

and

<input type="text" name="timepicker1" class="timepicker"/>

But this picker still shows designators even I formatted it as custom.

image

Google Chrome 53.0.2785.143 m (64-bit) Internet Explorer 11.0.9600.18230 Firefox 49.0.1

Here is JSFiddle example: http://jsfiddle.net/18vwvy66/

But why? Isn't that custom format (timeformat) is for? Is there any way to prevent these designators?

wvega commented 7 years ago

Hi @sonergonul. Setting names are case-sensitive; you should use timeFormat instead.

sonergonul commented 7 years ago

@wvega Oh, I'm deeply sorry about that. Looks like I wrote it myself since Visual Studio doesn't suggest any result when I start typing as intellisense. Just a silly mistake.

wvega commented 7 years ago

@sonergonul no worries ;)