$("input").change(function(){
alert("The text has been changed.");
});
$(document).on("input", "#payedValue", function () {
var mad = $("#madyoniya").val();
var payed = $(this).val();
$("#rest").val(parseFloat(mad) - parseFloat(payed));
});
$(".date").datepicker({
onSelect: function(dateText) {
console.log("Selected date: " + dateText + "; input's current value: " + this.value);
}
});