JSFiddle - React, Tailwind, and code Playground

by Ignacio Fuentes

HTML

<script src="https://raw.github.com/SteveSanderson/knockout/master/build/output/knockout-latest.js"></script>
<div>
<input type="text" data-datepicker="true" name="someting" data-bind="value: nested().date" />
</div>

<div data-bind="with: nested">
<input type="text" data-datepicker="true" name="someting" data-bind="value: date" />
</div>

JavaScript

var NestedViewModel = function() {
    var self=this;
    self.date = ko.observable(new Date());
};
var ViewModel = function() {
    var self=this;
    self.nested = ko.observable(new NestedViewModel());
};

var vm = new ViewModel();
ko.applyBindings(vm);
$(":input[data-datepicker]").datepicker();