vlio20 / angular-datepicker

Highly configurable date picker built for Angular applications
https://wondrous-crostata-172891.netlify.app/
MIT License
496 stars 142 forks source link

has no exported member 'ValidationErrors' #113

Closed nobitahuang closed 7 years ago

nobitahuang commented 7 years ago

image

nobitahuang commented 7 years ago

may i know what caused this ?

vlio20 commented 7 years ago

mmm.. don't know.... Can you please upload a demo repo?

nobitahuang commented 7 years ago

image this is from your day-calendar.component.d.ts

and i was hoping to have a Active Dates , right now can bind to an NgModel which cause the date selected , or can i achieve something like active dates ? sorry OOT

vlio20 commented 7 years ago

I will have to get a demo in order to reproduce your issue, could you supply one?

nobitahuang commented 7 years ago

a new repo just with this package will do ? @vlio20

vlio20 commented 7 years ago

sure, with some very basic usage of the component with your configuration. By the way I just released new version 2.0.0 - please see if it happens there as well.

LeyliAbbas commented 7 years ago

I faced the same problem. Could you solve it?

vlio20 commented 7 years ago

@Leyli698, Can you please post a demo repo?

vlio20 commented 7 years ago

closing for now. will reopen if more info will be provided.

YasserMuhammad commented 7 years ago

i have the same error and i think it's because there's no export for ValidationErrors in angular/forms

vlio20 commented 7 years ago

I will need a demo project to do some investigation

YasserMuhammad commented 7 years ago

just test it with angular quick-start as soon as u import the angular-datepicker this error will appear

Jaeger87 commented 7 years ago

Same problem for me, this is my package.json: { "name": "ffghffbfmf", "version": "1.0.0", "scripts": {}, "license": "ISC", "dependencies": { "@angular/common": "~2.2.0", "@angular/compiler": "~2.2.0", "@angular/core": "~2.2.0", "@angular/forms": "~2.2.0", "@angular/http": "~2.2.0", "@angular/platform-browser": "~2.2.0", "@angular/platform-browser-dynamic": "~2.2.0", "@angular/router": "~3.0.2", "@angular/upgrade": "~2.2.0", "angular2-timepicker": "^1.1.3", "bootstrap": "^3.3.7", "core-js": "^2.4.1", "ng2-date-picker": "^2.5.1", "reflect-metadata": "^0.1.8", "rxjs": "^5.4.3", "systemjs": "0.19.39", "zone.js": "^0.6.25" }, "devDependencies": { "@types/core-js": "^0.9.34", "typescript": "^2.0.3", "typings": "^1.4.0", "ng2-bs3-modal": "0.10.4" } } I'm pretty sure that the problem is related to this, however if you want the repo how can i post to you?

YasserMuhammad commented 7 years ago

@Jaeger87 i think that u need to upgrade to Angular 4 it worked for me when i updated my package.json

Jaeger87 commented 6 years ago

It worked even for me! thank you.

gauravrajdeo commented 6 years ago

`import { AbstractControl, ValidationErrors } from "@\angular/forms";

export class UsernameValidators { cannotContainSpace(control: AbstractControl) : ValidationErrors | null { if ((control.value as string).indexOf(' ') >= 0) { return { cannotContainSpace: true }; } return null; } }`

In my custom validator I'm getting this error while working with angular 2