Jahr und Monat nur DatePicker AngularJs und BootstrapHTML

HTML-Programmierer
Anonymous
 Jahr und Monat nur DatePicker AngularJs und Bootstrap

Post by Anonymous »

Ich habe ein Problem, das ich von Datum von Datum verwenden möchte (einchecken und mit Monaten nicht tagelang aussehen) und es sollte mit Monaten sein, das Problem ist: Ich habe eine Vorlage, aber es zeigt mir, dass der Tag und das Jahr und der Monat, was ich nur Monate und Jahr ist. src = "https://i.sstatic.net/xlqmq.png"/>

Http://plnkr.co/edit/w5pb1bomlohzfnwkmu8o?p.preview: />









Start




End







< /code>

JS: < /p>

angular.module('plunker', ['ui.bootstrap']);
var DatepickerDemoCtrl = function ($scope, $timeout) {
$scope.start = new Date('11/20/13');
$scope.end = new Date();

$scope.minStartDate = 0; //fixed date
$scope.maxStartDate = $scope.end; //init value
$scope.minEndDate = $scope.start; //init value
$scope.maxEndDate = $scope.end; //fixed date same as $scope.maxStartDate init value

$scope.$watch('start', function(v){
$scope.minEndDate = v;
});
$scope.$watch('end', function(v){
$scope.maxStartDate = v;
});

$scope.openStart = function() {
$timeout(function() {
$scope.startOpened = true;
});
};

$scope.openEnd = function() {
$timeout(function() {
$scope.endOpened = true;
});
};

$scope.dateOptions = {
'year-format': "'yy'",
'starting-day': 1
};
};
< /code>

Danke im Voraus < /p>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post