(this only works in Chrome at the moment as most browsers don\'t yet implement date picker for input type=\"date\")
In the following example MyDate starts o
These days is so much easier with Moment.js
this.sessionDate = ko.observable(moment().format('YYYY-MM-DD'));
this.getFormattedDate = () => { return moment(this.sessionDate()'YYYY-MM-DD').format('MM/DD/YYYY') }; // Note this is ES2015 syntax
In your html you can bind it with
And display it formatted as
Loading Date
No need to create custom bindings, and you can use a shim for older browsers.