mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 06:09:02 +02:00
Better integration with Angular models.
This commit is contained in:
@@ -90,6 +90,8 @@ define [
|
||||
month = parseInt(month, 10)
|
||||
year = parseInt(year, 10)
|
||||
|
||||
return unless !isNaN(month) and !isNaN(year)
|
||||
|
||||
month: month, year: year
|
||||
|
||||
return {
|
||||
@@ -271,8 +273,14 @@ define [
|
||||
|
||||
parseExpiry = (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
|
||||
|
||||
return $filter('date')(expiry, 'MM/yyyy')
|
||||
|
||||
# Format CVC
|
||||
|
||||
Reference in New Issue
Block a user