Nur Jahr und Monat, Datepicker, AngularJS und BootstrapHTML

HTML-Programmierer
Guest
 Nur Jahr und Monat, Datepicker, AngularJS und Bootstrap

Post by Guest »

Ich habe ein Problem: Ich möchte die Datumsauswahl von Datum zu Datum verwenden (Ein- und Auschecken mit Monaten, nicht mit Tagen), und es sollte mit Monaten sein. Das Problem ist: Ich habe eine Vorlage, aber sie zeigt mir den Tag und das Jahr an und der Monat, was ich will, ist nur Monat und Jahr

Das bekomme ich und ich will nur Monate und Jahr


http://plnkr.co/edit/W5pb1boMLOHZFnWkMU8o?p=preview< /p>

html :

Code: Select all










[h4]Start[/h4]



[/i]

[h4]End[/h4]

[i]
[/i]




js :

Code: Select all

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
};
};
Vielen Dank im Voraus

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post