I am trying to implement the datepicker into my asp form and as described here: http://eonasdan.github.io/bootstrap-datetimepicker/ (The "Custom Formats" example).

I am getting the error "Uncaught TypeError: $(...).datetimepicker is not a function"

This is the implementation in the view itself ( the exact same as the example):

<div class="row">
        <div class='col-sm-6'>
            <div class="form-group">
                <div class='input-group date' id='datetimepicker3'>
                    <input type='text' class="form-control" />
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-time"></span>
                    </span>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $(function () {
                $('#datetimepicker3').datetimepicker({
                    format: 'LT'
                });
            });
        </script>
    </div>

This is beginning of the the function (it's large) that is being pulled with with the "bootstrap-datetimepicker.js" script that it being called in the head of the page.

var dateTimePicker = function (element, options) {
    var picker = {},
        date = moment().startOf('d'),
        viewDate = date.clone(),
        unset = true,

       ...
}

I have tried the "$('#datetimepicker3').datetimepicker({" line both with an uppercase "T" in time and "P" in picker and it still does not seem to work.

I am new with jQuery and any help would be appreciated.

Related posts

Recent Viewed