bootstrap-datetimepicker

How to set min-time and max-time for Angular Timepicker?

半腔热情 提交于 2019-12-24 03:41:06
问题 Is there a way to set a minimum time and maximum time for Angular's bootstrap time picker? With Angular's Datepicker setting a min and max date is supported, and I am wondering if there is a similar functionality allowed for the Timepicker. Looking at the settings in the Angular Documentation for Timepicker it does not appear there is a way to do this... but just wondering if anyone is familiar with a way to achieve this behaviour. Thanks in advance for and insights/advice! Edit: To give some

defaultDate and minDate with Bootstrap Datetimepicker

試著忘記壹切 提交于 2019-12-22 08:10:56
问题 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

defaultDate and minDate with Bootstrap Datetimepicker

半腔热情 提交于 2019-12-22 08:09:19
问题 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

bootstrap-datepicker set language globally

三世轮回 提交于 2019-12-22 04:12:34
问题 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">

VueJS - model binding not working with inputs using jQuery plugins

喜夏-厌秋 提交于 2019-12-21 05:12:10
问题 I am working on converting a form to utilize VueJS. The form has an input for a date of birth that uses eonasdan/bootstrap-datetimepicker (http://eonasdan.github.io/bootstrap-datetimepicker/). The problem is that when I change the value of the dob input with DateTimePicker, VueJS does not bind to this. It only works if the user directly types in the input, which is what I'm trying to avoid (to properly format the date). The input itself is nothing special: <div class="input-group date">

How to set time picker only set time from 8:30 am to 8:30 pm in bootstrap-datetimepicker.js?

只愿长相守 提交于 2019-12-20 15:23:10
问题 HTML CODE: <div class="form-group"> <label class="col-md-3 control-label" for="event_date">Start at</label> <div class="col-md-8"> <input id="event_start_date" name="event_start_date" type="text" placeholder="" class="form-control input-md event_date" required=""> </div> </div> <div class="form-group"> <label class="col-md-3 control-label" for="event_date">End at</label> <div class="col-md-8"> <input id="event_end_date" name="event_end_date" type="text" placeholder="" class="form-control

Using vue js with selectpicker

走远了吗. 提交于 2019-12-20 07:27:34
问题 I'm using Vue.js to add multiple rows, each row contain two datetimepicker inputs and a bootstrap-select. My problem is when I fill the inputs and click to add a new row the previous ones clear out, the reason is each time I add a new row I'm using setTimeout to referesh the selectpicker and the datetimepicker. So I want to know if there is a way to trigger the last added element them without refreshing the previous ones. Here is my code : HTML <div class="cols" id="app"> <ul style="list

jQuery bootstrap-datetimepicker change event

我们两清 提交于 2019-12-18 12:48:01
问题 I am using bootstrap-datetimepicker plugin from Jonathan Peterson on my project. I'm having a problem with change event : If I define event like this : $('#Release').on('dp.change', function(e){ console.log(e.date()); }) I get the error : Uncaught TypeError: e.date is not a function Anyone knows how to get new date value on change event ? 回答1: Looking at that link, it appears you are very close. You need to remove the parenthesis to get the right value.The way you currently are trying to log

How to disable date before today in datetimepicker bootstrap?

狂风中的少年 提交于 2019-12-13 22:05:00
问题 Demo and full code is like this : http://fiddle.jshell.net/oscar11/dgb09c5c/5/ My Javascript code is like this : $('#time-start').datetimepicker({ format: 'yyyy-mm-dd hh:ii:ss', autoclose: true, pickerPosition: "bottom-left", maxView: 3, minuteStep: 1, minDate: new Date() }) How to disable date before today? I add minDate: new Date() , but it's not working Any solution to solve my problem? 回答1: From Bootstrap datetime picker documentation $.fn.datetimepicker.defaults = { maskInput: true, //

Access parent scope variable in child controller template - Angular

假装没事ソ 提交于 2019-12-13 08:33:05
问题 How would I access parent scope variable in child controller template? I have child controller (time picker) and want to change the button text under child controller by parent controller. How would I modify the value of child template using parent controller? Plunker code: https://plnkr.co/edit/WVFVTF7wKsGTgOrBfADB?p=preview enter code here 回答1: Child views have automatically access to $scope properties. Just access them as you normally would. Modifying parent properties is slightly more