bootstrap-datepicker

Angularjs with Bootstrap-Datepicker: input not actively being recognized

旧时模样 提交于 2019-12-22 18:38:46
问题 I'm trying to create an AngularJS application using bootstrap-datepicker. Here is my HTML: <div id="test" class="input-append date"> <input type="text" ng-model="datepicker.date" class="span4"> <span class="add-on"><i class="icon-th"></i></span> </div> {{ datepicker.date }} The last line is for debugging purposes. When this page is in action, the datepicker works fine and writes any date I pick into the input box. The issue is, as I click on a date, the {{ datepicker.date }} part does not

Bootstrap datepicker toggle disable

邮差的信 提交于 2019-12-22 12:19:00
问题 I am using bootstrap-datepicker and getting an issue. When I click a day, it works well,but when I click the same day again. The selection gets cancelled The boostrap datepicker demo works well. I had found the example for bootstrap date picker from the above link. 回答1: It's a known issue. Here is a workaround for this issue. https://github.com/eternicode/bootstrap-datepicker/issues/816 jsfiddle the issue: http://jsfiddle.net/antonkruger/fpgseobz/ Once I've tried it, I'll post an update.

bootstrap-datepicker: How to use specific time zone?

本小妞迷上赌 提交于 2019-12-22 07:59:59
问题 I created a small program to select the date using bootstrap-datepicker and write it to MySQL. The catch is that this date must be local to Europe/Berlin regardless where the user is at the moment. $(....).datepicker({ startDate: 'today' }); My question is: how do I set startDate to be local to specific timezone without using server side code (PHP) or any other libraries ? I tried using moment + moment-timezone but it's also showing the local browser date. var todaysDate = moment().tz('Europe

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">

bootstrap datepicker, beforeShowDay and array of disabled dates

北战南征 提交于 2019-12-21 16:59:02
问题 I am trying to use bootstrap datepicker plugin (https://github.com/eternicode/bootstrap-datepicker/blob/release/docs/index.rst) with array of disabled days passed into it. My code (partial): var disabled_dates = ["23.03.2014","21.03.2014"]; $("#datepicker").datepicker({ language: "pl", autoclose: true, startDate: '+1d', weekStart: 1, default: 'dd.mm.yyyy', beforeShowDay: function(date){ var formattedDate = $.fn.datepicker.DPGlobal.formatDate(date, 'dd.mm.yyyy', 'pl'); if ($.inArray

Bootstrap datepicker: Select entire week and put week interval in input field

白昼怎懂夜的黑 提交于 2019-12-20 09:37:30
问题 I am currently using bootstrap-datepicker (https://github.com/eternicode/bootstrap-datepicker), but want to be able to select entire weeks in the calendar (Monday to Sunday), as well as display the week interval in the input field that I am selecting from. The default interval in the input field should be the week that you are currently in. I have seen a somewhat similar method using jQuery UI to display the interval on jsfiddle. C I have tried editing this code to work for bootstrap

how to restrict bootstrap date picker from future date

徘徊边缘 提交于 2019-12-17 16:18:47
问题 I want to restrict the date picker of bootstrap from taking future date.I just want to enable the dates up to today only.How can i achieve this. Here is my code <script> var FromEndDate = new Date(); $(function(){ $('.datepicker').datepicker({ format: 'mm-dd-yyyy', endDate: FromEndDate, autoclose: true }); }); </script> Can any body help regarding this 回答1: Here is a demo of a working solution: http://jsfiddle.net/tjnicolaides/cjp7y/ <script> $(function(){ $('.datepicker').datepicker({ format

Bootstrap datepicker change minDate/startDate from another datepicker

て烟熏妆下的殇ゞ 提交于 2019-12-17 10:43:06
问题 There are two datepickers in my page and both are of bootstrap. The condition is only that Start date never High with respect to End Date. Means End date Attribute (minDate) must be changed when Start Date changed by datepicker and same when End Date Changed, the minrange of calendar of Start Date datepicker should be according to End Date Value. I hope you understand my problem $(document).ready(function(){ $("#startdate").datepicker({ todayBtn: 1, autoclose: true, }).on('changeDate',

How to restrict the selectable date ranges in Bootstrap Datepicker?

守給你的承諾、 提交于 2019-12-17 03:31:35
问题 I need to use datepicker which provides me the option of restricting the selectable dates. We had been using jQuery UI which is used to support it using minDate, maxDate options. $("#id_date").datepicker({minDate: +1, maxDate: '+1M +10D'}); Recently we started using Twitter Bootstrap for our styles. And apparently, Twitter Bootstrap is incompatible with jQuery UI styles. So I tried using one of the bootstrap compatible datepickers available at http://www.eyecon.ro/bootstrap-datepicker/.

bootstrap Datepicker : set value as last day of the month not working

℡╲_俬逩灬. 提交于 2019-12-13 07:42:25
问题 I have a bootstrap datepicker on months mode. I need the value to be last day of the month. How do I make this code work? $("#end-date").datepicker({ minViewMode: 1, }).on('changeMonth',function(e) { //value of the end month is the last day of month alert( new Date(e.date.getYear(), e.date.getMonth() + 1, 0)); $("#end-date-catalog").datepicker('update', new Date(e.date.getYear(), e.date.getMonth() + 1, 0)); }); plugin demo (here) jsfiddle (here) 回答1: You don't have to change the source code