bootstrap-datetimepicker

Bootstrap 3 Datepicker in Angular 2+ with or without jquery

馋奶兔 提交于 2019-12-06 08:46:14
I am new to Angular 2+. I am trying to integrate Bootstrap 3 Datepicker in AngularJS2. I used the [solution]: How to use Bootstrap 3 Datepicker in angular 2 . But got error like Cannot find name '$' Is there any way to implement the task with or without jquery? My code given below. index.html <script src="//code.jquery.com/jquery-1.12.0.min.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30=" crossorigin="anonymous"></script> <script src="/

How to restrict the bootstrap timepicker min-time and max-time?

断了今生、忘了曾经 提交于 2019-12-06 06:00:40
问题 I am using bootstrap time picker by using bootstrap-timepicker.js and i want to restrict the min-time and max-time of that timepicker .Can anyone please tell me how can i achieve it. I have used following methods but nothing gonna help me out: $('input[data-role="time"]').timepicker({ showMeridian: true, minTime: { hour: 10, minute: 15 }, minuteStep: 1, showInputs: true, defaultTime: defaulttime }) And $('input[data-role="time"]').timepicker({ showMeridian: true, minTime: '10:15', minuteStep:

g.size() is not a function - Jquery Error

爱⌒轻易说出口 提交于 2019-12-05 11:55:38
问题 I have been trying to use bootstrap datetimepicker and have all the components on my scripts like Moment JS, bootstrap-date-time js, and bootstrap js but I am getting g.size() is not a function error. I am trying to run the following function $(function(){ $('#datetimepicker').datetimepicker(); }); 回答1: I had the same error as you, and I could not find a solution for it anywhere. In fact the only reference to the g.size() is not a function error was this question, at the time with only a

defaultDate and minDate with Bootstrap Datetimepicker

别来无恙 提交于 2019-12-05 10:07:16
I want a picker to be set to a month in the future by default. This works fine: <script type="text/javascript"> $(function () { $('#enddatepicker').datetimepicker({ defaultDate: moment().add(1, 'M').toDate(), locale: 'de', format: 'DD.MM.YYYY' }); }); </script> However, I also want the date to be not before tomorrow. So I try adding a minDate option: <script type="text/javascript"> $(function () { $('#enddatepicker').datetimepicker({ minDate: moment().add(1, 'd').toDate(), defaultDate: moment().add(1, 'M').toDate(), locale: 'de', format: 'DD.MM.YYYY' }); }); </script> However, now the default

Bootstrap-Datetimepicker not working with the jQuery 3

核能气质少年 提交于 2019-12-05 03:58:40
Bootstrap-datetimepicker is not working with jQuery 3.1.1. I need to use the same jQuery library to run all the other dependent functions. As per the docs, the required files for bootstrap datetimepicker to run are : jQuery Moment.js Bootstrap.js Bootstrap CSS Bootstrap Datepicker CSS Locales: Moment's locale files See this fiddle and check External Resources on the left Initialize like this $('#datetimepicker1').datetimepicker(); I have used the following files : jQuery 3.1.1 moment.js bootstrap.min.css bootstrap.min.js bootstrap-datetimepicker.min.css bootstrap-datetimepicker.min.js Also,

datetimepicker erasing value from input if value exists at page load

▼魔方 西西 提交于 2019-12-05 03:47:31
I'm using this datetime picker for Bootstrap 4 https://tempusdominus.github.io/bootstrap-4/ The plugin works just fine if the input is blank at load. However, I have an Edit form that has already a value but the datepicker is removing the value at page load. <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <input class="form-control datetimepicker-input" data-target="#Entry_EntryDate" data-toggle="datetimepicker" data-val="true" data-val-date="The field Event Date must be a date." data-val-required="The Event Date field is required." id="Entry_EntryDate

bootstrap-datepicker set language globally

心已入冬 提交于 2019-12-05 03:28:09
I'm using bootstrap-datepaginator that inside uses bootstrap-datepicker. Utilizzanto bootstrap-datepicker as a single component, there are no problems to set the language, but the same is not true using bootstrap-datepaginator. How can I do? I'm trying to set the Italian language as a default for the entire project. In index.html I put the following script: <script src="vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script> <script src="vendors/jquery-ui/ui/i18n/datepicker-it.js"></script> <script> $(function() { $( "#datepicker" ).datepicker( $.datepicker.regional[ "it" ] ); }); <

Eonasdan Bootstrap datetimepicker format

≡放荡痞女 提交于 2019-12-05 00:53:11
问题 How to set a format in bootstrap 3 datetimepicker. I want the format "dd/MM/yyyy hh:mm" and I dont want "AM" and "PM". For that in which language I can use here. The following fiddle How can I do this? http://jsfiddle.net/Eonasdan/0Ltv25o8/ $('#datetimepicker1').datetimepicker({ format : "dd/MM/yyyy hh:mm", }); <!-- padding for jsfiddle --> <div class="row"> <div class="col-md-12"> <div class="form-group"> <div class="input-group date" id="datetimepicker1"> <input type="text" class="form

How to restrict the bootstrap timepicker min-time and max-time?

若如初见. 提交于 2019-12-04 10:02:58
I am using bootstrap time picker by using bootstrap-timepicker.js and i want to restrict the min-time and max-time of that timepicker .Can anyone please tell me how can i achieve it. I have used following methods but nothing gonna help me out: $('input[data-role="time"]').timepicker({ showMeridian: true, minTime: { hour: 10, minute: 15 }, minuteStep: 1, showInputs: true, defaultTime: defaulttime }) And $('input[data-role="time"]').timepicker({ showMeridian: true, minTime: '10:15', minuteStep: 1, showInputs: true, defaultTime: defaulttime }) use event changeTime , check the current time, if

Bootstrap datetimepicker disable future date and time

余生颓废 提交于 2019-12-04 07:02:34
问题 I am trying to disable future hours within today using disabledTimeIntervals but it doesn't seem to work. What I need to do is disable future hours in timepicker for today only, because disabling dates I can do with maxDate. <input class="form-control input-sm pull-left " id="dp" placeholder="To" type="text"> $('#dp').datetimepicker({ maxDate: '0', disabledTimeIntervals: [[moment(), moment().hour(24).minutes(0).seconds(0)]], format: 'm/d/Y H:i A', timepicker: true, }); JSFIDDLE: https:/