bootstrap-datepicker

Bootstrap Datepicker : Changing start date to tomorrow

天涯浪子 提交于 2019-12-08 04:11:29
问题 I am using the Bootstrap datepicker and the following is my jQuery code: $('.form_date').datetimepicker({ language: 'en', /* endDate: '+0d', */ startDate: '+1d', weekStart: 1, autoclose: 1, startView: 2, format: 'dd/mm/yyyy', minView: 2, forceParse: 0, }); The following is what I get: I want have the start date highlighting on tomorrow according to our requirement. I have found one option defaultViewDate on the Bootstrap datepicker documentation. (http://bootstrap-datepicker.readthedocs.org

Rails 5 - Using bootstrap datepicker unless browser supports HTML5 date controls

爷,独闯天下 提交于 2019-12-08 03:58:20
问题 I am trying to put together a working solution for using the date_field HTML5 date controls when the browser supports it and fall back to use the Bootstrap Datepicker if not. It seems like this is a common scenario to tackle but I haven't been able to find a solution that works for me (namely, one that doesn't involve manually adding a hidden field for every date field since I already have a bunch across a number of pages). Using this writeup as a guide I have a partially working solution

Bootstrap datepicker error when using other language: Uncaught TypeError: Cannot read property 'length' of undefined

烈酒焚心 提交于 2019-12-07 22:54:42
问题 I'm using the datepicker from Bootstrap (http://bootstrap-datepicker.readthedocs.org/en/latest/i18n.html). When using datepicker without the "language" property, it works, but when I try to specify a language ("sv"), it fails with the message (i.e when trying to select a date in the widget): Uncaught TypeError: Cannot read property 'length' of undefined These are the versions I'm using: jQuery v1.8.3 jQuery UI 1.8.22 Boostrap 2.3.1 From looking at the debugger it seems that this is the code

Bootstrap datepicker — How to get toDisplay in other format and toValue in other format too

我与影子孤独终老i 提交于 2019-12-07 21:56:43
问题 For a long time, I'm having trouble with toValue and toDisplay . I need and appear on the display to show the date in format dd.mm.yyyy and u toValue, which is sent with the form so that it is in the yyyy-mm-dd format. I tried all kinds of things but it still does not work. I attach the code from the plugin's official page. toDisplay: function (date, format, language) { var d = new Date(date); d.setDate(d.getDate() - 7); return d.toISOString(); }, toValue: function (date, format, language) {

Require Bootstrap date picker always in open mode

隐身守侯 提交于 2019-12-07 21:12:35
问题 How can i get Require Bootstrap date picker always in open mode? I am using bootstrap date picker in one of my application. Requirement is like date picker should be open when page load and it should be always in open mode after selection as well. I found that it can manageable through autoclose: false property but, if i click out side of date picker it's getting close. It should be there always in open mode. I hope there is any property which can make it possible, Please find following

Update bootstrap 3 datepicker options dynamically?

眉间皱痕 提交于 2019-12-07 15:38:08
问题 This datepicker it is already created with other default options, but I need to update it with the following new options and it does not seem to work: // new options var new_options = { format: 'dd/mm/yyyy', autoclose: true, language: 'es' } // update values $("#fecha_periodo").datepicker("update", new_options ); I would also like to update other options like daysOfWeekDisabled , viewMode and so on. 回答1: Unfortunately, there is no API to change options dinamically, all availables methods are

Rails 5 - Using bootstrap datepicker unless browser supports HTML5 date controls

自古美人都是妖i 提交于 2019-12-07 09:51:37
I am trying to put together a working solution for using the date_field HTML5 date controls when the browser supports it and fall back to use the Bootstrap Datepicker if not. It seems like this is a common scenario to tackle but I haven't been able to find a solution that works for me (namely, one that doesn't involve manually adding a hidden field for every date field since I already have a bunch across a number of pages). Using this writeup as a guide I have a partially working solution (using FireFox 49.0.2 to test): dates.js.coffee: datepicker = $.fn.datepicker.noConflict() # return $.fn

bootstrap-datetimepicker with vue.js not working properly

坚强是说给别人听的谎言 提交于 2019-12-07 06:15:31
问题 I am trying to use bootstrap-datepicker with Vue.js Trying to create a simple datepicker component. The problem is, when I write into input, component's data is updated. But when I use datepicker gui, it doesn't work. Data is not updated. Why? What is missing exactly? Here is my code: Vue.component('picker', { 'props': { 'date': { 'twoWay': true } }, 'template': '\ <div class="form-group">\ <div class="input-group date datepicker">\ <input type="text" class="form-control" v-bind:value="this

Bootstrap datepicker return focus after select

為{幸葍}努か 提交于 2019-12-07 05:12:23
问题 If you initialize a bootstrap datepicker from eternicode with autoclose: true , two undesirable behaviors happen: After the picker closes, when you tab into the next field, you'll start at the beginning of the document again. This can be quite cumbersome on long forms. Because the picker changes the value programatically, any listeners that you have that care about the blur event on the input won't behave properly. The blur actually occurs when you select the picker value and the input's

Bootstrap datepicker toggle disable

∥☆過路亽.° 提交于 2019-12-06 12:01:57
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. 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. Update: Yes it works. In the defaults @ line 1394, add a new option, allowDeselection var defaults = $.fn