danielmoncada / date-time-picker-moment-adapter

Moment.js adapter for https://github.com/danielmoncada/date-time-picker
MIT License
5 stars 9 forks source link

Cannot read properties of null reading clampDate at set pickerMoment [as pickerMoment] #14

Open AnassL opened 1 year ago

AnassL commented 1 year ago

Hi,

Error message: Cannot read properties of null reading clampDate at set pickerMoment [as pickerMoment]

This issue raised on Angular 16 standalone dialog form component for Full-calendar implementation.

Here is the component decorator:

@Component({ selector: 'app-form-dialog:not(o)', templateUrl: './form-dialog.component.html', standalone: true, imports: [ CommonModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatSelectModule, MatIconModule, OwlDateTimeModule, OwlNativeDateTimeModule ], providers: [CalendarService] })

Some used packages versions:

"@angular/animations": "16.0.3",
"@angular/cdk": "16.0.2",
"@angular/common": "16.0.3",
"@angular/compiler": "16.0.3",
"@angular/core": "16.0.3",
"@angular/flex-layout": "15.0.0-beta.42",
"@angular/forms": "16.0.3",
"@angular/material": "16.0.2",
"@angular/material-luxon-adapter": "16.0.2",
"@angular/platform-browser": "16.0.3",
"@angular/platform-browser-dynamic": "16.0.3",
"@angular/router": "16.0.3",

"@danielmoncada/angular-datetime-picker": "^16.0.1",
"@fullcalendar/angular": "^6.1.9",
"@fullcalendar/core": "^6.1.9",
"@fullcalendar/daygrid": "^6.1.9",
"@fullcalendar/interaction": "^6.1.9",
"@fullcalendar/list": "^6.1.9",
"@fullcalendar/timegrid": "^6.1.9",
charleswanghc commented 1 month ago

I also encountered the same problem. when using in standalone dialog. angular 18

"dependencies": { "@angular/animations": "^18.2.7", "@angular/cdk": "^18.2.7", "@angular/common": "^18.2.7", "@angular/compiler": "^18.2.7", "@angular/core": "^18.2.7", "@angular/forms": "^18.2.7", "@angular/material": "^18.2.7", "@angular/platform-browser": "^18.2.7", "@angular/platform-browser-dynamic": "^18.2.7", "@angular/platform-server": "^18.2.7", "@angular/router": "^18.2.7", "@angular/ssr": "^18.2.7", "@auth0/angular-jwt": "^5.2.0", "@danielmoncada/angular-datetime-picker": "^18.1.0", "express": "^4.18.2", "jszip": "^3.10.1", "moment": "^2.30.1", "moment-timezone": "^0.5.46", "ng-openapi-gen": "^0.51.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.14.10" }, "devDependencies": { "@angular-devkit/build-angular": "^18.2.7", "@angular/cli": "^18.2.7", "@angular/compiler-cli": "^18.2.7", "@types/express": "^4.17.17", "@types/jasmine": "~5.1.0", "@types/node": "^18.18.0", "jasmine-core": "~5.1.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "tailwindcss": "^3.4.4", "typescript": "~5.4.2" },