datepicker

jQuery datepicker - defaultDate (dynamically) from another datepicker

不想你离开。 提交于 2021-02-10 07:14:35
问题 I have two datepickers at the moment, one for a start date, and another for an end date. When you select the first date, I'd like the default value of the second datepicker to be set to the same date. If I use the setDate it works and sets the value just fine, but the default value won't change - if I set the defaultDate when the datepicker is loaded, it works, but if I try to set it on the fly it doesn't. Here's my code: if($('#startDate').val().length == 10 && $("#endDate").val().length !=

Date value goes out of date constraints in Safari Mobile

江枫思渺然 提交于 2021-02-10 05:26:16
问题 I am trying to understand the level of support of <input type="date"> in iOS. I tested it with an iPhone 4 with iOS 7.0.3, even if I specify a min attribute the date picker lets me choose a date before the constraint. The HTML code is this: <input type="date" id="checkIn" name="checkIn" class="form-control input-sm" value="2014-05-26" min="2014-05-26" data-date-format="YYYY-MM-DD" data-date-minDate="2014-05-26" placeholder="yyyy-mm-dd"> The data attributes are set for this datepicker but I

Bootstrap datepicker trigger change

妖精的绣舞 提交于 2021-02-09 07:11:26
问题 I have from and to input fields with bootstrap date picker. When query params not empty I would like to change the value of these input fields and trigger the change date event on datepicker because I have a function that calculates total price between dates. When user selects dates from datepicker works fine but if I change the value by jquery it does not calculate. $('#from').val('<%= @from_date %>').trigger( 'change' ); $('#to').val('<%= @to_date %>').trigger( 'change' ); //function var

Bootstrap datepicker trigger change

[亡魂溺海] 提交于 2021-02-09 07:04:04
问题 I have from and to input fields with bootstrap date picker. When query params not empty I would like to change the value of these input fields and trigger the change date event on datepicker because I have a function that calculates total price between dates. When user selects dates from datepicker works fine but if I change the value by jquery it does not calculate. $('#from').val('<%= @from_date %>').trigger( 'change' ); $('#to').val('<%= @to_date %>').trigger( 'change' ); //function var

How to set minDate for ng-bootstrap datepicker

♀尐吖头ヾ 提交于 2021-02-08 12:16:36
问题 Below is the code I am using to set the minDate <input ngbDatepicker #d="ngbDatepicker" [minDate]="minDate" [formControl]="Form.controls['dateOfBirth']"> In the component I am setting the minDate as below: public minDate: Date = void 0; constructor() { this.minDate = new Date(1950, 1, 1); } But the datepicker still shows 2007 as the minDate. Is there any thing that is missing. Let me know in case any other information is required. Thanks for your time. 回答1: From your code snippet it looks

How to disable future dates in datepicker using jquery?

我的未来我决定 提交于 2021-02-08 11:34:48
问题 Datepicker future dates not disable. Here is my code for datepicker in HTML <div class="input-group input-append date" id="dp3" data-date="" data-date-format="mm-dd-yyyy"> <input class="form-control" style="width: 106px; height: 30px;" type="text" id="nodate" value="<?php echo date('m-j-Y');?>" readonly=""/> <div class="input-group-addon add-on" style="width: 35px; height: 25px;"><i class="icon-calendar"></i></div>   <button type="button" class="btn btn-primary" onclick="window.location = '<

How to black out specific days of the week (datepicker) [VB]

白昼怎懂夜的黑 提交于 2021-02-08 05:18:42
问题 I was wondering if it is possible to make particular days unavailable from the calendar (DatePicker), more specifically every Monday and Tuesday. I have found similar threads (How do create a DatePicker with only Sundays enabled? and Disable specific days of the week on jQuery UI datepicker) about blacking out dates, however, I have not been able to modify their code for my specific goal. I'm writing this application in VB.NET (WPF). The functions I used so far, for blacking out dates are:

How to black out specific days of the week (datepicker) [VB]

荒凉一梦 提交于 2021-02-08 05:18:15
问题 I was wondering if it is possible to make particular days unavailable from the calendar (DatePicker), more specifically every Monday and Tuesday. I have found similar threads (How do create a DatePicker with only Sundays enabled? and Disable specific days of the week on jQuery UI datepicker) about blacking out dates, however, I have not been able to modify their code for my specific goal. I'm writing this application in VB.NET (WPF). The functions I used so far, for blacking out dates are:

Can't set datepicker date from controller in AngularJS

ぃ、小莉子 提交于 2021-02-07 21:36:23
问题 I am trying to create an AngularJS datepicker on the push of a button. I am using this bootstrap-ui control. The control works (pops up on the click of a button, and I can select a date), but I can't seem to set the initial date back from the scope (so that when it is first opened, the designated date is already selected). The error I get in the Chrome console is: Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing

Can't set datepicker date from controller in AngularJS

喜你入骨 提交于 2021-02-07 21:36:21
问题 I am trying to create an AngularJS datepicker on the push of a button. I am using this bootstrap-ui control. The control works (pops up on the click of a button, and I can select a date), but I can't seem to set the initial date back from the scope (so that when it is first opened, the designated date is already selected). The error I get in the Chrome console is: Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing