Search Posts

Category: datepicker

Is there a way to get Angular datepicker close on mouseleave?

I have an angular calender that closes if clicked outside. However other things on my view close with ng-mouseLeave and Id like datepicker to act the same. <datepicker date-format=”d MMMM, yyyy”> <input ng-class=”{true: ‘error-bron’, false:’nonerror-bron’ [dateError===true]” readonly=”true” class=”bron-date” ng-model=”$” type=”text” placeholder=”Pick a date”/> </datepicker> Source: AngularJS

Angular bootstrap datepicker(uib-datepicker) not apply to new added elements

I have a filed with uib-datepicker that added to DOM with jQuery after page load. Now when I focus to field, datepicker not shown! create and append date picker field var dateInput = $compile(“<input type=’text’ class=’date-filter’ ng-model=’dateFilter’ uib-datepicker-popup=’yyyy-MM-dd’ is-open=’datePicker[1]’ ng-focus=’openDatePicker($event, 1)’>”)($scope); $(‘#wapper’).append(dateInput); open datepicker $scope.datePicker = []; $scope.openDatePicker = function ($event, datePickerIndex) { $event.preventDefault(); $event.stopPropagation(); $scope.datePicker[datePickerIndex] = true; }; It can be said: uib-datepicker not apply to filed at all! What’s the problem? Source: AngularJS

Why doesn’t the date picker load in my Kendo app?

I’m following along the example of how to use the DatePicker widget but it doesn’t seem to load correctly on my app. I’m currently doing: <div class=”form-group row”> <label for=”start_date” class=”col-sm-3 col-form-label”>Start Date</label> <div class=”col-sm-9″> <input kendo-date-picker /> </div> </div> Unfortunately, this doesn’t correctly create the widget and only creates a text input box. Does anyone know why this problem could be happening? I would appreciate any insight! Source: AngularJS

how to implement a simple datetime picker in angular 5?

I’m trying to make a datetime picker in Angular 5 but I’m having issues : <script src=””></script> <script> angular.module(‘dateInputExample’, []) .controller(‘DateController’, [‘$scope’, function($scope) { $scope.example = { value: new Date(2013, 9, 22) }; }]); </script> <form name=”myForm” ng-controller=”DateController as dateCtrl”> <label for=”exampleInput”>Pick a date in 2013:</label> <input type=”date” id=”exampleInput” name=”input” ng-model=”example.value” placeholder=”yyyy-MM-dd” min=”2013-01-01″ max=”2013-12-31″ required /> <div role=”alert”> <span class=”error” ng-show=”myForm.input.$error.required”> Required!</span> <span class=”error” ng-show=”myForm.input.$”> Not a valid date!</span> </div> <var>value = {{example.value | date: […]

data wont show when using datepicker as querry param

I want to set value of query params with a datepicker, but when I try it the data won’t display. I have include ng-model into my query params but doesn’t work. Here is my .jsfile, I want to pass dt and dt2 into query params in http get app.controller(“repcont”, [‘$scope’,’$http’,function($scope,$http){ $scope.open1 = function() { $scope.popup1.opened = true; }; $scope.open2 = function() { $scope.popup2.opened = true; }; $scope.setDate = function(year, month, day) { $scope.dt = new […]

md-date-picker date format issue with date format

I have this problem. Here is my datepicker <md-datepicker class=”form-control” ng-model=”startDate” md-placeholder=”Enter date”></md-datepicker> The point is that when I select a date, for example the 23rd of September, instead to see 23/11/2017 I see 11/23/2017. So there is a way to specify my date format as dd/MM/yyyy? I tried using ng-model-options attribute but no success. Thanks. Source: AngularJS

issue with mdDatepicker timezone

I have a mdDatepicker input that returned an error saying “Error: the ng-model for md-datepicker must be a Date instance. Currently the model is a string” After some digging, I found this post on github: and replaced this piece of code found in the ngMaterial directive: if (value && !(value instanceof Date)) { throw Error(‘The ng-model for md-datepicker must be a Date instance. ‘ + ‘Currently the model is a: ‘ + (typeof value)); […]

Angular Moment Date Picker date time inconsistency

I have an angular 1.5 application where i make use of a moment datepicker library from here : angular moment date picker Everything has worked well until recently when we realized that the date pickers rendered dates wrongly across different user pc’s .It appears this may have something to do with how JavaScript handles time zones: In the image below October 1, 2017 is actually a Sunday but the date picker renders it as a […]

DatePicker being truncated in dataTable

I have several datePicker in a dataTable , and a vertical scroll on that table. The issue is that when i open my datepicker, it doesn’t “pop outside” the datatable, but does something like this: Looking online i found that the solution could be to use the position:relative style on the parent of the datePicker , as stated on the Git page of the datepicker , but it does not seem to work on my […]

Next Page »