Added clear button on operation edit field.

This commit is contained in:
Alexis Lahouze committed 2013-01-08 18:03:25 +01:00
1 parent 30bf84480f
commit 318cc58074
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -87,6 +87,10 @@ var ListViewModel = function() {
$("#operation_date").datepicker({format: "yyyy-mm-dd"}).on('changeDate', function(ev){
self.selectedItem().operation_date(new Date(ev.date.valueOf()));
});
$("#operation_date_clear").click(function(e){
self.selectedItem().operation_date(null);
});
};
self.cancel = function() {
@@ -122,6 +126,10 @@ var ListViewModel = function() {
$("#operation_date").datepicker({format: "yyyy-mm-dd"}).on('changeDate', function(ev){
self.selectedItem().operation_date(new Date(ev.date.valueOf()));
});
$("#operation_date_clear").click(function(e){
self.selectedItem().operation_date(null);
});
};
self.save = function() {