ng2-validation
ng2-validation copied to clipboard
minDate throws error
I added an input as the following:
<input class="m-form-control m-form-control-sm"
id="activateDate"
name="activateDate"
required
type="date"
[(ngModel)]="editableGiftcardActivateDate"
[minDate]="minActivationDate | date: 'y-MM-dd'"
#activateDate="ngModel">
Even if I replace the minDate with a fixed value I get the error
TypeError: lang_1.isDate is not a function
at Object.exports.minDate (http://localhost:3000/vendor.bundle.js:20965:17)
at MinDateValidator.ngOnChanges (http://localhost:3000/vendor.bundle.js:20928:37)
at Wrapper_MinDateValidator.ngDoCheck (/CustomFormsModule/MinDateValidator/wrapper.ngfactory.js:29:20)
Not sure how to fix this, can you provide some assistance?
So far I found out that the facade folder is missing in the compiled state but I don't know why it is missing. (the screen is from the browser, not from IDE, so yeah, it is compiled without the facade part)
Maybe someone has some hints?
ADDITION: Problem occurs with minDate and with maxDate
I tried to integrate this module in a fresh installation of https://github.com/AngularClass/angular2-webpack-starter/ which did fail with the same error. When doing a angular-lci project from scratch it works. So it looks like the problem lies in the starter :(
I'm also using the AngularClass seed. I'm having the issue with the Date validator. It's claiming the lang_1.isDate
is missing. I see the facade folder in the node_modules
but I don't know about if it's in the browser.
This has been working for some time, and I haven't "updated" the seed at all. My project is too far in to just "restart" with the angular-cli.
This showed up for me after I wiped out my node_modules
and re-installed it.
From my perspective, this is not only a problem of AngularClass as this was working well for me now for months, and then suddenly after I had stopped the local server and re-started, it was then failing with the lang_1.isDate is not a function
error.