I am sharing a link of what I want to do (the last one in the link i.e, date time)
https://rsuite.github.io/multi-date-picker/
After doing this I want to store these entries inside observable array
Note: I want to do this everything inside simple notepad and with jQuery date time picker
function Friend() {
$(document).ready(function() {
$("#datetime").datetimepicker();
});
var self = this;
self.dates = ko.observable();
self.removeFriend=function() {
obj.friends.remove(self);
}
}
var obj = {
friends:ko.observableArray([new Friend()])
};
obj.addFriend=function() {
obj.friends.push(new Friend());
}
ko.applyBindings(obj);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js"></script>
<script src="
https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.min.css">
<h1>Hello JS</h1>
<ul data-bind="foreach:friends">
<li>
<input readonly type="text" id="datetime" data-bind="value:dates" />
<button data-bind="click: removeFriend">Remove Employee</button>
</li>
</ul>
<button data-bind="click: addFriend">Add Employee</button>
I am very new at this.