This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* read-only date display with momentjs | |
* use like this: data-bind="moment: dateVar, format: 'YYYY-MM-DD'" | |
* The "format" is optional and will default to "MM/DD/YYYY" | |
*/ | |
ko.bindingHandlers.moment = { | |
update: function (element, valueAccessor, allBindingsAccessor, viewModel) { | |
var val = valueAccessor(); | |
var date = moment(ko.utils.unwrapObservable(val)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>File Upload example</title> | |
<link href="/Content/bootstrap.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<form action="api/Upload" method="post"> | |
<div class="form-group"> |