Commit 461608e1 authored by Phil Hughes's avatar Phil Hughes Committed by Robert Speicher

replace hyphens to commas when converting date

parent 4eeef198
......@@ -26,8 +26,7 @@ class @DueDateSelect
addDueDate = ->
# Create the post date
value = $("input[name='#{fieldName}']").val()
valueSplit = value.split '-'
date = new Date(valueSplit[0], parseInt(valueSplit[1]) - 1, valueSplit[2])
date = new Date value.replace(new RegExp('-', 'g'), ',')
mediumDate = $.datepicker.formatDate 'M d, yy', date
data = {}
......
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