Form.Validator date exception on empty string #1030

Closed
dchristoff opened this Issue Sep 21, 2011 · 0 comments

2 participants

@dchristoff

http://jsfiddle.net/dimitar/V7kmB/

markup:

<form id="myForm">
    <input data-validators="validate-date dateFormat:'%d/%m/%Y'" id="date" />
</form>

code to trigger:

new Form.Validator(document.id('myForm'));
document.id("date").set("value", "   ").fireEvent("change");

exception is:
`date is null

http://fiddle.jshell.net/js/lib/mootools-more-1.4.0.1.js
Line 4771`

context is:

var date = Date.parse(value),
format = props.dateFormat || '%x',
formatted = date.format(format); 
@SergioCrisostomo SergioCrisostomo added this to the 1.5.1 milestone Jun 22, 2014
@arian arian closed this in #1270 Jun 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment