Commit 181f51fe authored by Eric Windham's avatar Eric Windham

fixed date formatting again

parent 34db3e2d
......@@ -22,6 +22,14 @@ define([], function() {
var fieldID = model.get( 'id' );
var value = model.get( 'value' );
var format = model.get( 'date_format' );
console.log(this);
console.log(model);
console.log(format);
if( 'default' === format) {
format = nfi18n.dateFormat;
}
if ( 0 < value.length ) {
// use moment's isValid to check against the fields format setting
if( moment( value, format ).isValid() ) {
......@@ -68,7 +76,11 @@ define([], function() {
/*
* Get our current date format
*/
var format = model.get( 'format' );
var format = model.get( 'date_format' );
if( 'default' === format) {
format = nfi18n.dateFormat;
}
/*
* Check our value to see if it is a valid email.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment