eonasdan-datetimepicker

How to create dynamic datetimepicker value?

夙愿已清 提交于 2020-01-06 05:44:07
问题 My HTML code like this: $(function () { $('#datetimepicker').datetimepicker({ minDate: moment().startOf('minute').add(300, 'm'), }); $("#btnSubmit").click(function() { value = document.getElementById('datetimepicker').value; console.log(value) }); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js

Bootstrap datetimepicker add 1 day to mindate

孤街醉人 提交于 2020-01-06 05:30:30
问题 I'm using bootstrap datetimepicker, how do I add one day in datetimepicker bootstrap minDate ? I want to filter the minDate for more 1 day. For example my checkIn datetimepicker is 02/16/18 then the the date to 02/16/18 is disabled in checkOut datetimepicker. <script> $(function () { $('#CheckIn').datetimepicker({ format: 'MM/DD/YYYY' }); $('#CheckOut').datetimepicker({ useCurrent: false,//Important! See issue #1075 format: 'MM/DD/YYYY' }); $("#CheckIn").on("dp.change", function (e) { $('

Bootstrap datetimepicker add 1 day to mindate

时间秒杀一切 提交于 2020-01-06 05:30:29
问题 I'm using bootstrap datetimepicker, how do I add one day in datetimepicker bootstrap minDate ? I want to filter the minDate for more 1 day. For example my checkIn datetimepicker is 02/16/18 then the the date to 02/16/18 is disabled in checkOut datetimepicker. <script> $(function () { $('#CheckIn').datetimepicker({ format: 'MM/DD/YYYY' }); $('#CheckOut').datetimepicker({ useCurrent: false,//Important! See issue #1075 format: 'MM/DD/YYYY' }); $("#CheckIn").on("dp.change", function (e) { $('

Bootstrap Glyphicons datetimepicker change icons

血红的双手。 提交于 2019-12-30 22:30:07
问题 I am using Bootstrap datetimepicker https://eonasdan.github.io/bootstrap-datetimepicker/ As mentioned in the document I was successfully able to change the up, down arrows using below code. $('#datetimepicker7').datetimepicker({ sideBySide: true, icons: { up: "fa fa-chevron-circle-up", down: "fa fa-chevron-circle-down", } }); May I know how to change the left, right icons of the calendar? For easy understanding I have highlighted the icons to be changes in below image. Any help would be

samuelcolvin's django-bootstrap3-datetimepicker not showing calendar when clicked on input field

不问归期 提交于 2019-12-24 16:31:54
问题 I am trying to use samuelcolvin's django-bootstrap3-datetimepicker in which its based on Eonasdan's bootstrap-datetimepicker but forked from nkunihiko's django-bootstrap3-datetimepicker to show the calendar so the user can select the date and time and submit it. The issue I am having is that when I try to click on the field or on the right button with the calendar icon in it like in the demo website, it does not show me nothing. I also had to add widgets.py from the repo into my project since

Disable future dates in Bootstrap 3 Datetimepicker

旧城冷巷雨未停 提交于 2019-12-24 00:39:21
问题 I'm using Bootstrap 3 Datetimepicker and I need to disable all my future dates, I know it has it's own disabledDates function but I tried so many times and it's still not working. What am I doing wrong? $('#data_move').datetimepicker({ language: 'pt-BR', disabledDates: [ moment("22/02/2017") ] }); 回答1: You should use maxDate option instead of disabledDates . Here a working example: $('#data_move').datetimepicker({ locale: 'pt-br', maxDate: moment() }); <link href="//cdnjs.cloudflare.com/ajax

How to set date-picker with JQuery 3.3.1 and Bootstrap 3.3.7?

六月ゝ 毕业季﹏ 提交于 2019-12-21 21:27:11
问题 I have to set date picker for input fields in few different forms. In the past I have used jQuery date-picker but for this project I use Bootstrap 3 so there is another method that is available. Here is example that I have so far: $(document).ready(function() { $('.datepick').datetimepicker(); }); <!---*** Start: JQuery 3.3.1 version. ***---> <script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <!---*** End: JQuery 3.3.1 version. ***--

Datetimepicker - allow choosing on disable dates

爱⌒轻易说出口 提交于 2019-12-20 03:08:51
问题 I know that sound crasy but I need to allow choosing disable dates here: https://eonasdan.github.io/bootstrap-datetimepicker/ Why? I need to color dates with less possibility to booking, and color green dates where possibility to book is bigger so I write: <script> $(function () { $('#start').datetimepicker({ format: 'YYYY/MM/DD', enabledDates: [ moment("05/21/2016"), moment("05/22/2016"), moment("05/23/2016"), moment("05/24/2016"), ], }); }); </script> <style type="text/css"> .bootstrap

Datetimepicker - allow choosing on disable dates

拥有回忆 提交于 2019-12-20 03:08:24
问题 I know that sound crasy but I need to allow choosing disable dates here: https://eonasdan.github.io/bootstrap-datetimepicker/ Why? I need to color dates with less possibility to booking, and color green dates where possibility to book is bigger so I write: <script> $(function () { $('#start').datetimepicker({ format: 'YYYY/MM/DD', enabledDates: [ moment("05/21/2016"), moment("05/22/2016"), moment("05/23/2016"), moment("05/24/2016"), ], }); }); </script> <style type="text/css"> .bootstrap

Is it possible to use HTML5 Data Attributes to initialize the Bootstrap 3 Datepicker?

蓝咒 提交于 2019-12-18 09:06:07
问题 At the the moment, we're using the datetimepicker in a semi-modular way because the initialization is done in javascript. Formerly we were using a different datepicker component which lacked the time picking function but could be initialized via data-attributes. This made things a lot easier because in the asp.net MVC 5 project in which that component was used, we could simply create an editor template that was referenced whenever a datepicker was needed, without having to write any