Ngx-formly: Any idea why datepicker is not working?

Created on 8 Jan 2019  路  3Comments  路  Source: ngx-formly/ngx-formly

I'm submitting a ...

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[x] support request

Current behavior
Datepicker field is not showing up.

Expected behavior
Datepicker should appear on the page

Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/formly-datepicker?file=src%2Fapp%2Fapp.module.ts

question

All 3 comments

importing from @angular/material/core would solve the issue (maybe related to https://github.com/angular/material2/issues/7947 but not sure)

import { MatNativeDateModule } from '@angular/material/core';

@aitboudad Bro, I have been converting my form components to formly. Everything is fine except bootstrap datepicker. Spent 4 hours on this. Can you figure out why date isn't binding with my custom bootstrap datepicker type ?
https://stackblitz.com/edit/ngx-bootstrap-datepicker-kse7b3?file=app/type.ts

@anasvn you've missed passing formControl which is required for formly to take account of input changes as it was mentioned in the doc
https://stackblitz.com/edit/ngx-bootstrap-datepicker-l69bux

@Component({
  selector: 'app-form-datepicker-type',
  template: `
    <input
      [formControl]="formControl"
  ...
Was this page helpful?
0 / 5 - 0 ratings

Related issues

b4z81 picture b4z81  路  3Comments

ugogiordano87 picture ugogiordano87  路  4Comments

shohrukh92 picture shohrukh92  路  4Comments

wpcfan picture wpcfan  路  3Comments

shp0 picture shp0  路  4Comments