vendredi 10 juin 2016

Setting time in textbox corresponding with clockpicker


I am using the clockpicker from http://weareoutman.github.io/clockpicker/ and I am trying to figure out how to show the time in the textbox (always). I want the time to always be shown as "Now" in the textbox but give the user the ability to change it with the clock window. I have been able to set the 'now' time as default on the clock but I am having two problems.

First problem The clock is not showing if its AM or PM from just using 'Now'

Second problem I am unable to display that time in the value of the textbox unless its selected from the clock. I want the time to already be displayed for now. But to allow the user the option to change it with the clock. Format ex: 08:30 PM

Any help with this would be greatly appreciated!

http://jsfiddle.net/YkvK9/1714/

    <div class="col-lg-6">
    <div class="form-group">
      <label>test</label>
        <div class="input-group clockpicker" data-autoclose="true">
            <input type="text" class="form-control" value="" >
            <span class="input-group-addon">
                <span class="fa fa-clock-o"></span>
            </span>
        </div>
    </div>
</div>


    $('.clockpicker').clockpicker({
                'default': 'now',
                twelvehour: true,
            });

Aucun commentaire:

Enregistrer un commentaire