datepicker

How to disable the future dates in datepicker using angularjs and jquery

瘦欲@ 提交于 2020-01-05 05:39:47
问题 Hi I need to disable the future dates, I have tried in all the ways but I'm unable please let me know where I'm wrong. <div class="input-group date"> <input type="text" class="form-control pull-right" id="datepicker2" placeholder="Date of Join" ng-model="DateofJoining"> <div class="input-group-addon"></div> </div> $('#datepicker2').datepicker({ autoclose: true, maxDate: new Date() }); I have even tried in angularjs also but wasn't able to disable them, please let me know how to disable the

Validation on Kendo UI for Angular DatePicker not working

十年热恋 提交于 2020-01-05 05:39:25
问题 I'm trying to use form validation on a Kendo UI for Angular DatePicker and it just doesn't seem to work. I'm doing the following on all other form elements: <div class="form-group row" [ngClass]="{ 'has-danger' : email.invalid && (email.dirty || email.touched) }"> <input id="email" type="text" class="form-control" [(ngModel)]="member.email" name="email" #email="ngModel" required /> </div> This works perfectly fine. But when I try the same with the Kendo UI for Angular DatePicker I get the

how to remove time stamp or get only date form datepicker in flutter default datepicker?

前提是你 提交于 2020-01-05 05:35:07
问题 I am trying to get date from default datepicker widget of flutter but when i select date i get time with it. I only want date not time. & would also like to change date format if possible. This is what i have used from example somewhere. DateTime selectedDate = DateTime.now(); Future<Null> _selectDate(BuildContext context) async { final DateTime picked = await showDatePicker( context: context, initialDate: selectedDate, firstDate: DateTime(2019), lastDate: DateTime(2020)); if (picked != null

how to set date picker minimum date with one month back from today

独自空忆成欢 提交于 2020-01-05 04:57:48
问题 I am using swift with xcode7.3.1 . I want to set my date picker minimum date must be one month back from today.I am using the following code.I think its not correct way.Could you please help me on this scenario. let calendar = NSCalendar.currentCalendar() let oneMonthBack = calendar.dateByAddingUnit(.Day, value: -30, toDate: NSDate(), options: []) datePicker.minimumDate = oneMonthBack 回答1: try this function func previousMonth(sender : AnyObject) { let currentCalendar = NSCalendar

how to set date picker minimum date with one month back from today

拟墨画扇 提交于 2020-01-05 04:57:15
问题 I am using swift with xcode7.3.1 . I want to set my date picker minimum date must be one month back from today.I am using the following code.I think its not correct way.Could you please help me on this scenario. let calendar = NSCalendar.currentCalendar() let oneMonthBack = calendar.dateByAddingUnit(.Day, value: -30, toDate: NSDate(), options: []) datePicker.minimumDate = oneMonthBack 回答1: try this function func previousMonth(sender : AnyObject) { let currentCalendar = NSCalendar

how can i find tomorrow and yesterday with angularjs

只谈情不闲聊 提交于 2020-01-05 04:37:07
问题 I'm working with angularJS and I need to find the next and the previous day of a date. I have the datepicker <span data-ng-model="$parent.selected_date" is-open="opened" data-show-button-bar="false" datepicker-popup show-weeks="false" starting-day="1" language="locale" datepicker-options="datepickerConfig" date-disabled="disabled(date, mode)" > <button type="button" class="btn btn-default btn-md text-center" data-tooltip="{{ 'Interface-UserWeek-Tooltip-Datepicker' | translate }}" data-ng

Open jQuery dialog box upon selecting a date from jQuery datepicker inline

你离开我真会死。 提交于 2020-01-05 04:08:36
问题 Presently my project page is having a jQuery datepicker inline placed on one of the section of the page. The below code is used to achieve the same. <link rel="stylesheet" href="~/Scripts/Calendar/jquery-ui-1.10.1.custom.css"> <script src="~/Scripts/Calendar/jquery-1.9.1.js"></script> <script src="~/Scripts/Calendar/jquery-ui-1.10.1.custom.js"></script> <script> $(document).on("change", "#datepicker", function () { var date = $(this).val(); $( "#dialog" ).dialog(); }); </script> // The below

ASP.NET with jQuery DatePicker

淺唱寂寞╮ 提交于 2020-01-05 04:08:16
问题 I would like to do something like this: http://jqueryui.com/datepicker/ However, I'm not exactly sure how: I have a masterpage-content page, and when I tried to copy that code and paste them into the content page, it will say "XXXX cannot be in the content region". When the user hit the submit button, how am I going to pass the date in the textbox to the server side code? Here are parts of my code: .aspx: <asp:Content ID="Content4" ContentPlaceHolderID="MainContent1" runat="server"> <p>Date:

How to change the date format in bootstrap Datepicker?

旧街凉风 提交于 2020-01-05 03:51:32
问题 The code for datepicker is as follows: $("#startDate").datepicker({ autoclose:true, startView:"months", minViewMode:"months", orientation: "bottom", format: "dd-MM-yyyy" }).on('changeDate', function(selected){ startDate = new Date(selected.date.valueOf()); startDate.setDate(startDate.getDate(new Date(selected.date.valueOf()))); $('.to').datepicker('setStartDate', startDate); }); $("#endDate").datepicker({ autoclose:true, startView:"months", minViewMode:"months", orientation: "bottom", format:

Angular2: call component method from javascript function [duplicate]

限于喜欢 提交于 2020-01-05 02:37:01
问题 This question already has answers here : How to access the correct `this` inside a callback? (10 answers) Closed 3 years ago . Currently I'm trying to implement bootstrap datepicker, which using jQuery , with my Angular2 project. Here is what I have so far: import {Component, AfterViewInit, Injector, Inject} from '@angular/core'; import {ObservableService} from "../../../services/data-observable.service"; declare var $:any; @Component({ selector: 'date-range', moduleId: module.id, template: `