Permalink
Browse files

Fixing bug in js/view/Discipline.js

  • Loading branch information...
1 parent 2c2fa4f commit f26cb33048d4e1d2937e4a9d951ac7cc6705f07d @csikvand csikvand committed Jul 18, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 js/view/Discipline.js
View
8 js/view/Discipline.js
@@ -4,10 +4,16 @@ var imageURL = document.getElementsByName("imageURL").length == 0? '' : document
// Render functions
function renderDate(value, p, record) {
- return Ext.Date.dateFormat(value, 'm-d-Y');
+ if(value == null) // Date in wrong format
+ return "";
+ else
+ return Ext.Date.dateFormat(value, 'm-d-Y');
}
function renderDateTime(value, p, record) {
+ if(value == null)
+ return "";
+ else
return Ext.Date.dateFormat(value, 'm-d-Y H:i:s');
}

0 comments on commit f26cb33

Please sign in to comment.