<commit_before>import {Component} from '@angular/core';
declare var Materialize: any;

@Component({
    selector: "datePicker",
    template: `
      <form materialize class="col s12">
        <div class="row">
          <div class="col s6">
            <label for="birthdate">Birthdate {{birthdate}}</label>
            <input id="birthdate" [(ngModel)]="birthdate" name="birthdate" (ngModelChange)="modelChanged($event)"
                   materialize="pickadate"
                   [materializeParams]="[{format: 'dd/mm/yyyy'}]"
                   type="text" />
          </div>
        </div>
      </form>
    `
})
export class DatePicker {
    birthdate;

    constructor() {
        this.birthdate = new Date('03/12/2017');<commit_msg>docs: Example code for datepicker<commit_after>import {Component,EventEmitter} from '@angular/core';
import { MaterializeAction } from "../../../lib/materialize-directive";
declare var Materialize: any;

@Component({
    selector: "datePicker",
    template: `
      <form materialize class="col s12">
        <div class="row">
          <div class="col s6">
            <label for="birthdate">Birthdate {{birthdate}}</label>
            <input id="birthdate" [(ngModel)]="birthdate" name="birthdate" (ngModelChange)="modelChanged($event)"
                   materialize="pickadate"
                   [materializeActions]="actions"
                   [materializeParams]="[{format: 'dd/mm/yyyy'}]"
                   type="text" />
          </div>
        </div>
      </form>
      <br/><br/>
      <a class="waves-effect waves-light btn" (click)="openAndClose()">Open and Close</a>
        `
})
export class DatePicker {
    birthdate;

      actions = new EventEmitter<string|MaterializeAction>();

    constructor() {
        this.birthdate = new Date('03/12/2017');
    }

    openAndClose() {
        this.actions.emit({action:"pickadate",params:["open"]});
        window.setTimeout(()=>{
            this.actions.emit({action:"pickadate",params:["close"]});
        },1000);
{'fraction_non_alphanumeric': 0.16576221016280218, 'fraction_numerical': 0.012826837691169216, 'mean_word_length': 2.5025906735751295, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7544057', 'n_tokens_mistral': 628, 'n_tokens_neox': 578, 'n_words': 112}