This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,6 @@ angular.module('ui.bootstrap.dateparser', [])
81
81
apply : function ( value ) { this . month = value - 1 ; } ,
82
82
formatter : function ( date ) { return dateFilter ( date , 'M' ) ; }
83
83
} ,
84
- {
85
- key : 'LLLL' ,
86
- regex : $locale . DATETIME_FORMATS . STANDALONEMONTH . join ( '|' ) ,
87
- apply : function ( value ) { this . month = $locale . DATETIME_FORMATS . STANDALONEMONTH . indexOf ( value ) ; } ,
88
- formatter : function ( date ) { return dateFilter ( date , 'LLLL' ) ; }
89
- } ,
90
84
{
91
85
key : 'd!' ,
92
86
regex : '[0-2]?[0-9]{1}|3[0-1]{1}' ,
@@ -236,6 +230,15 @@ angular.module('ui.bootstrap.dateparser', [])
236
230
formatter : function ( date ) { return dateFilter ( date , 'G' ) ; }
237
231
}
238
232
] ;
233
+
234
+ if ( angular . version . major >= 1 && angular . version . minor > 4 ) {
235
+ formatCodeToRegex . push ( {
236
+ key : 'LLLL' ,
237
+ regex : $locale . DATETIME_FORMATS . STANDALONEMONTH . join ( '|' ) ,
238
+ apply : function ( value ) { this . month = $locale . DATETIME_FORMATS . STANDALONEMONTH . indexOf ( value ) ; } ,
239
+ formatter : function ( date ) { return dateFilter ( date , 'LLLL' ) ; }
240
+ } ) ;
241
+ }
239
242
} ;
240
243
241
244
this . init ( ) ;
You can’t perform that action at this time.
0 commit comments