0

I am using bootstrap3 datetimepicker.I got the documentation from

https://eonasdan.github.io/bootstrap-datetimepicker/

Its says

Note All functions are accessed via the data attribute e.g. $('#datetimepicker').data("DateTimePicker").FUNCTION()

What is its meaning.I cant understand it.

My js file containes this code

 <script type="text/javascript">
            $(function () {
                $('#datetimepicker3').datetimepicker({
                    format: 'LT'
                });
            });
        </script>

What changes should i make in this. Please help me

1
  • shows your html with the libs you import please! Commented Mar 4, 2016 at 16:05

1 Answer 1

1

Its says

Note All functions are accessed via the data attribute e.g. >$('#datetimepicker').data("DateTimePicker").FUNCTION()

What is its meaning.I cant understand it.

This is referring to the datetimepicker functions, rather than options - it isn't required to get the datetimepicker to work.

If you look at the 'Linked Pickers' example, you will see they have used these two lines to modify the min/max dates of the two datetimepickers:

$('#datetimepicker7').data("DateTimePicker").minDate(e.date);

$('#datetimepicker6').data("DateTimePicker").maxDate(e.date);

Your js looks okay to me, so it's likely a problem in your HTML or your import. If you press F12 and look at the console output, you should be able to see any js errors - this might help to debug where the problem is.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.