Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmdev committed Nov 19, 2016
1 parent 2f974a2 commit c35f2e7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngComboDatePicker",
"version": "1.2.3",
"version": "1.2.4",
"authors": [
"jfmdev <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-combo-date-picker",
"version": "1.2.3",
"version": "1.2.4",
"description": "An Angular directive to select dates using combo boxes",
"main": "source/ngComboDatePicker.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ _Select dates with combo boxes_

[See the live demos and read the docs](http://jfmdev.github.io/ngComboDatePicker/ "ngComboDatePicker - Live demos and docs")

> If you use the React library, you should check [reactComboDatePicker](https://github.com/jfmdev/reactComboDatePicker), a fork of this project that uses React instead of Angular.
Usage
-----

Expand Down Expand Up @@ -54,7 +56,7 @@ Name | Description
`ngAttrsMonth` | A JSON object with the attributes to add to the `select` element for the month.
`ngAttrsYear` | A JSON object with the attributes to add to the `select` element for the year.
`ngYearOrder` | A _string_ indicating if the years must be sorted in "ascending" or "descending" order.
`ngTimezone` | A _number_ indicating timezone to be used. By default the timezone of the client is used.
`ngTimezone` | A _number_ indicating the timezone to be used when converting a string or an integer to a date. By default the timezone of the client is used.
`ngPlaceholder` | A _string_ with the placeholders for the year, month and date combo boxes (in that order), separated by comma.

License
Expand Down
6 changes: 3 additions & 3 deletions source/ngComboDatePicker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* ngComboDatePicker v1.2.3
* ngComboDatePicker v1.2.4
* http://github.com/jfmdev/ngComboDatePicker
* «Copyright 2015 Jose F. Maldonado»
* License: LGPLv3 (http://www.gnu.org/licenses/lgpl-3.0.html)
Expand Down Expand Up @@ -98,13 +98,13 @@ angular.module("ngComboDatePicker", [])
// Initialize minimal and maximum values.
$scope.minDate = parseDate($scope.ngMinDate, $scope.ngTimezone);
if($scope.ngMinDate == null) {
var now = adjustTimezone(new Date(), $scope.ngTimezone);
var now = new Date();
$scope.minDate = new Date(now.getFullYear()-100, now.getMonth(), now.getDate(),
now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds());
}
$scope.maxDate = parseDate($scope.ngMaxDate, $scope.ngTimezone);
if($scope.maxDate == null) {
$scope.maxDate = adjustTimezone(new Date(), $scope.ngTimezone);
$scope.maxDate = new Date();
}

// Verify if selected date is in the valid range.
Expand Down
4 changes: 2 additions & 2 deletions source/ngComboDatePicker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c35f2e7

Please sign in to comment.