Skip to content

Instantly share code, notes, and snippets.

@ro31337
Created October 1, 2014 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ro31337/a7529976c3d591d28b65 to your computer and use it in GitHub Desktop.
Save ro31337/a7529976c3d591d28b65 to your computer and use it in GitHub Desktop.
var ViewModel = new function() {
var self = this;
self.Name = ko.observable("Sample User");
self.DateOfBirth = ko.observable();
}
ko.applyBindings(ViewModel);
<span data-bind="text: Name"></span>
<span data-bind="dateString: DateOfBirth, datePattern: 'MM/DD/YYYY'"></span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment