File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
src/material/core/datetime Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -443,23 +443,6 @@ export class NativeDateAdapter extends DateAdapter<Date> {
443443 ) ;
444444 }
445445
446- private _dateComponentsAreValid ( year : number , month : number , day : number ) {
447- if ( year < 0 || year > 9999 || month < 0 || month > 11 || day < 1 || day > 31 ) {
448- return false ;
449- }
450-
451- if ( month === 1 ) {
452- const isLeapYear = ( year % 4 === 0 && year % 100 !== 0 ) || year % 400 === 0 ;
453- return isLeapYear ? day <= 29 : day <= 28 ;
454- }
455-
456- if ( month === 3 || month === 5 || month === 8 || month === 10 ) {
457- return day <= 30 ;
458- }
459-
460- return true ;
461- }
462-
463446 /**
464447 * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.
465448 * @param value Time string to parse.
You can’t perform that action at this time.
0 commit comments