bootstrap-datepicker

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" ] ); }); <

how to disable specific date range in bootstrap daterangepicker?

牧云@^-^@ 提交于 2019-12-04 10:04:18
I want to disable specific date range in bootstrap daterangepicker. I need to use bootstrap daterangepicker which provides me the option of restricting the specific date range. To disable dates, use datesDisabled method to provide an array. Some dates are disabled in this CodePen . $("#picker").datepicker({ datesDisabled:["11/24/2016","11/28/2016","12/02/2016","12/23/2016"] }); EDIT Previous answer was for Bootstap DatePicker... Sorry for the misreading, my bad. Here is what I have found for Bootstrap DateRangePicker: // Define the disabled date array var disabledArr = ["11/24/2016","11/28

How to highlight specific dates in bootstrap datepicker?

随声附和 提交于 2019-12-04 05:30:31
I am using bootstrap datepicker.I need to highlight some random dates. For Example: I need to highlight the dates like 1,3,8,20,21,16,26,30. Could you please tell me how to highlight those random dates in bootstrap datepicker? user3702362 As suggested by amphetamachine Highlight certain dates on bootstrap-datepicker provides most of what is required to solve this. The answer to that question can be adapted to the following $('.inline_date').datepicker({ multidate: true, todayHighlight: true, minDate: 0, beforeShowDay: function(date) { var hilightedDays = [1,3,8,20,21,16,26,30]; if (

How to catch the bootstrap datepicker change event?

岁酱吖の 提交于 2019-12-03 16:30:17
问题 Now I am trying to do something after user change the date. But seems like my ng-change is ignored. Here is my code sample: <input ng-change='changedate()' type="text" starting-day="2" show-button-bar="false" show-weeks="false" class="form-control addTicketDateInput" datepicker-popup="dd MMM" ng-model="startdate" is-open="openstart" datepicker-options="dateOptions" ng-required="true" close-text="Close" /> In my controller: $scope.changedate=function(){ console.log($scope.startdate); } Any

Why does bootstrap-datepicker trigger 'show.bs.modal' when it is displayed?

这一生的挚爱 提交于 2019-12-03 07:36:43
问题 I have a modal, illustrated below, When I select the input field that contains the date picker, the bootstrap modal event .on('show.bs.modal') gets triggered, which is super problematic because I'm taking all kinds of async action when the modal is legitimately shown. I'm of the opinion that the modal is already shown and this event should not be firing. I have a listener on the bootstrap event 'show.bs.modal' as referenced below, handleModalLaunch: () -> $(@modalClass).on 'show.bs.modal',

bootstrap datepicker setDate format dd/mm/yyyy

一笑奈何 提交于 2019-12-03 01:12:28
I have to set the date in my datepicker in dd/mm/yyyy format. Whet I'm trying to do, with Javascript is this: var year = 2014; var month = 5; var day = 10; var realDate = new Date(year, month - 1, day); // months are 0-based! $('#MainContent_txtDataConsegna').datepicker({ dateFormat: 'dd/mm/yyyy' }); // format to show $('#MainContent_txtDataConsegna').datepicker('setDate', realDate); the problem is that the value inside my datepicker is always in format mm/dd/yyyy. Where is the problem?? Here the definition datepicker and datepicker options: <div class="input-group date"> <asp:TextBox runat=

Twitter Bootstrap date picker

强颜欢笑 提交于 2019-12-03 00:18:42
问题 How can I use the Twitter Bootstrap date picker? I used the code below but its not working. <html> <head> <title>DatePicker Demo</title> <script src="js/jquery-1.7.1.js"></script> <link href="css/datepicker.less" rel="stylesheet" type="text/css" /> <link href="css/bootstrap.css" rel="stylesheet" type="text/css" /> <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <script src="js/bootstrap-datepicker.js"></script> </script> </head> <body> <form > <div class="input"> <input

Why does bootstrap-datepicker trigger 'show.bs.modal' when it is displayed?

自闭症网瘾萝莉.ら 提交于 2019-12-02 21:07:48
I have a modal, illustrated below, When I select the input field that contains the date picker, the bootstrap modal event .on('show.bs.modal') gets triggered, which is super problematic because I'm taking all kinds of async action when the modal is legitimately shown. I'm of the opinion that the modal is already shown and this event should not be firing. I have a listener on the bootstrap event 'show.bs.modal' as referenced below, handleModalLaunch: () -> $(@modalClass).on 'show.bs.modal', (event) => return if event.dates promise = new Promise ( (resolve, reject) => @setModalData(event) if (

Bootstrap Datepicker: Cannot implicitly convert type 'System.DateTime?' to 'System.DateTime'. An explicit conversion exists (are you missing a cast?)

荒凉一梦 提交于 2019-12-02 20:26:13
问题 I am a newbie here. I have gone through similar questions here but none of them helped. I have the following in my ViewModel : public DateTime FromDate { get; set; } public DateTime ToDate { get; set; } When I run the code, in the View after GET Method , I am getting the default dates as: 01/01/0001 , in other words, null /default value. I searched online and found out that I need to make these fields nullable . Therefore, I changed the above code to: public DateTime? FromDate { get; set; }

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

心不动则不痛 提交于 2019-12-02 18:30:45
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-datepicker, without any luck. Any idea how I can implement this for bootstrap-datepicker? : Any help is