ericjgagnon / wickedpicker

A simple jQuery timepicker
http://ericjgagnon.github.io/wickedpicker/
MIT License
93 stars 78 forks source link

How to use time picker with dynamic added content #28

Open mohsenjalalian opened 8 years ago

mohsenjalalian commented 8 years ago

I use wickedpicker to add time picker to my form. I have dynamic added content in my form but when i call wickedpicker in my code it did not work

jkardong commented 8 years ago

I dynamically add my wickedpicker to my forms without issue. I'm using Javascript to create them depending on user action. Perhaps you can post your code to look at?

mohsenjalalian commented 8 years ago

hi my friend

My code is opencart special tab in adding product

vinitpatel03 commented 7 years ago

i have same issue... i want to set input time value.... if i click on link which has time (there are number of records with different time). that time i want to set into input box. Please help me When i click on link... i call getTime() function to set my value to input box.....

vinitpatel03 commented 7 years ago

jq(document).ready(function () { fnDatePicker('#txtCollectionDate', 1, false, "0", false, "0"); fnDatePicker('#txtFutureCollectionDate', 1, false, "0", false, "0"); getTime();

    });
    var tempValue = "12:00";
    function getTime() {

        jq('.timepicker').wickedpicker(options);

        var options = {
            now: "" + tempValue + "", //hh:mm 24 hour format only, defaults to current time
            twentyFour: false,  //Display 24 hour format, defaults to false
            upArrow: 'wickedpicker__controls__control-up',  //The up arrow class selector to use, for custom CSS
            downArrow: 'wickedpicker__controls__control-down', //The down arrow class selector to use, for custom CSS
            close: 'wickedpicker__close', //The close class selector to use, for custom CSS
            hoverState: 'hover-state', //The hover state class to use, for custom CSS
            title: 'Timepicker', //The Wickedpicker's title,
            showSeconds: false, //Whether or not to show seconds,
            secondsInterval: 1, //Change interval for seconds, defaults to 1,
            minutesInterval: 1, //Change interval for minutes, defaults to 1
            beforeShow: null, //A function to be called before the Wickedpicker is shown
            show: null, //A function to be called when the Wickedpicker is shown
            clearable: false, //Make the picker's input clearable (has clickable "x")
        };
    }