Skip to content

Commit

Permalink
fix: Fixed model-binding example for datepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
rubyboy committed Apr 30, 2016
1 parent f7a1787 commit 769cc1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/model-bindings/model-bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import * as Materialize from "../../../src/index";
<h4>Datepicker model binding</h4>
<div class="row">
<div class="input-field col s6">
<input type="text" [(ngModel)]="datepicker" materialize="pickadate" />
<input type="text" [(ngModel)]="datepicker" materialize="pickadate" [materializeParams]="[{format:'dd/mm/yyyy'}]" />
</div>
</div>
<p>{{ datepicker }}</p>
Expand All @@ -45,8 +45,8 @@ export class ModelBindings {
inputVal : string;
datepicker: string;
constructor() {
this.datepicker = '12/12/12';

this.datepicker = '01/02/2016';

// input
this.inputVal="Materialize is awesome!";
Expand Down
11 changes: 11 additions & 0 deletions index-materializecss.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/js/materialize.min.js"></script>
</head>
<body>
<script>
</script>
</body>
</html>

0 comments on commit 769cc1d

Please sign in to comment.