-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(md-datepicker): Date not being parsed when using tab on control
fix(md-datepicker): Datepicker opening when setting date through textbox feat(md-datepicker): Add modular and bindable way of adding parsers to datepicker
- Loading branch information
acamilleri
committed
Jul 25, 2016
1 parent
5b4e9f1
commit 8c869b5
Showing
189 changed files
with
3,041 additions
and
2,741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
define(['exports'], function (exports) { | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
|
||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
|
||
var DatePickerDefaultParser = exports.DatePickerDefaultParser = function () { | ||
function DatePickerDefaultParser() { | ||
_classCallCheck(this, DatePickerDefaultParser); | ||
} | ||
|
||
DatePickerDefaultParser.prototype.canParse = function canParse(value) { | ||
if (value) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
|
||
DatePickerDefaultParser.prototype.parse = function parse(value) { | ||
if (value) { | ||
var result = value.split('/').join('-'); | ||
result = new Date(result); | ||
return isNaN(result) ? null : result; | ||
} | ||
return null; | ||
}; | ||
|
||
return DatePickerDefaultParser; | ||
}(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.