mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Better integration with Angular models.
This commit is contained in:
parent
4814fc2606
commit
1af5017e49
1 changed files with 9 additions and 1 deletions
|
@ -90,6 +90,8 @@ define [
|
||||||
month = parseInt(month, 10)
|
month = parseInt(month, 10)
|
||||||
year = parseInt(year, 10)
|
year = parseInt(year, 10)
|
||||||
|
|
||||||
|
return unless !isNaN(month) and !isNaN(year)
|
||||||
|
|
||||||
month: month, year: year
|
month: month, year: year
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -271,8 +273,14 @@ define [
|
||||||
|
|
||||||
parseExpiry = (value) ->
|
parseExpiry = (value) ->
|
||||||
if value?
|
if value?
|
||||||
dateAsObj = ccUtils.parseExpiry(value);
|
dateAsObj = ccUtils.parseExpiry(value)
|
||||||
|
|
||||||
|
console.log dateAsObj
|
||||||
|
|
||||||
|
return unless dateAsObj?
|
||||||
|
|
||||||
expiry = new Date dateAsObj.year, dateAsObj.month - 1
|
expiry = new Date dateAsObj.year, dateAsObj.month - 1
|
||||||
|
|
||||||
return $filter('date')(expiry, 'MM/yyyy')
|
return $filter('date')(expiry, 'MM/yyyy')
|
||||||
|
|
||||||
# Format CVC
|
# Format CVC
|
||||||
|
|
Loading…
Reference in a new issue