1778

bootstrap datetimepicker installation

Question:

I am using bootstrap datetimepicker version 3. Here datetimepicker de-faulty taking current date and time. But in next version this problem is resolved. So I will try to use Eonasdan bootstrap datetimepicker version v4. For that what are the js and css files I have include in my jsp page?

Answer1:

Check manual installation guide <a href="https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Installation#manual" rel="nofollow">here</a>.

You must include:

<ul><li>jQuery</li> <li>Moment.js</li> <li>Bootstrap + collapse + transitions</li> </ul>

So the files needed would be:

<ul><li>bootstrap.min.js</li> <li>bootstrap.min.css</li> <li>moment-with-locales.js</li> <li>bootstrap-datetimepicker.css</li> <li>bootstrap-datetimepicker.js </li> </ul>

Check this <a href="http://jsfiddle.net/33Le4k93/" rel="nofollow">fiddle</a> for a working example.

HTML:

<br/> <!-- padding for jsfiddle --> <div class="row"> <div class="col-md-12"> <h6>datetimepicker1</h6> <div class="form-group"> <div class="input-group date" id="datetimepicker1"> <input type="text" class="form-control" /> <span class="input-group-addon"><span class="glyphicon-calendar glyphicon"></span></span> </div> </div> </div> </div>

JS:

$('#datetimepicker1').datetimepicker();

Recommend

  • Type mismatch: cannot convert from Connection to Connection
  • Conditional render in tagfile depending on whether the attribute is specified or not
  • Spring MVC redirect with custom http headers
  • CUDA NSight is not installed with CUDA 5.0 installation file on Windows 8? [closed]
  • Is it mandatory to have a doGet or doPost method?
  • Graceful pod termination
  • Add Windows Feature from C#
  • iOS Cordova first plugin - plugin.xml to inject a feature
  • How do I retrieve the user information of a user authenticated with Apache's mod_ldap?
  • Suppressing passwd when calling sqlplus from shell script
  • Reading a file into a multidimensional array
  • Security issues with PHP's Readfile method
  • Object and struct member access and address offset calculation
  • D3 get axis values on zoom event
  • zope_i18n_compile_mo_files doesn't work on a Zeo configuration
  • How to suppress a dialog
  • Hardware Accelerated Image Scaling in windows using C++
  • Custom validator control occupying space even though display set to dynamic
  • Magento Fatal error: Maximum execution error solution, on WAMP
  • JSON response opens as a file, but I can't access it with JavaScript
  • How to avoid particles glitching together in an elastic particle collision simulator?
  • Recording logins for password protected directories
  • If I include Java 8 in my Android app does that affect which devices it will work on?
  • Splitting given String into two variables - php
  • Check if a string to interpolate provides expected placeholders
  • htaccess rewriting URLs with multiple forward slashes
  • Display Images one by one with next and previous functionality
  • Why is the timeout on a windows udp receive socket always 500ms longer than set by SO_RCVTIMEO?
  • Web-crawler for facebook in python
  • Do I've to free mysql result after storing it?
  • Confusion with PayPal's monthly billing cycle
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • How do I rollback to a specific git commit
  • Is there a mandatory requirement to switch app.yaml?
  • A cron job substitute?
  • Buffer size for converting unsigned long to string
  • Hits per day in Google Big Query
  • How to get Windows thread pool to call class member function?
  • apache spark aggregate function using min value
  • Busy indicator not showing up in wpf window [duplicate]