Javascript datePicker Controller: Hard Coded string working, variable not
<p>I'm using a datePicker that can be found here:</p>

<p><a href="http://www.frequency-decoder.com/2011/10/11/unobtrusive-accessible-datepicker-widgit-v6" rel="nofollow">http://www.frequency-decoder.com/2011/10/11/unobtrusive-accessible-datepicker-widgit-v6</a></p>

<p>I have it working fine, as long as I hard code the id of the object. i.e.</p>

<pre><code>var newid = "date" + maxidOnce.toString();
        datePickerController.createDatePicker({                           
            formElements:{"date1":"%Y-%m-%d"},
            statusFormat:"%l, %d %F %Y", 
            noFadeEffect:true
        }); 
</code></pre>

<p>However if I replace the id with the variable, it no longer works. I don't see how there is any difference.</p>

<pre><code>var newid = "oncedate" + maxidOnce.toString();
        datePickerController.createDatePicker({                           
            formElements:{newid:"%Y-%m-%d"},
            statusFormat:"%l, %d %F %Y", 
            noFadeEffect:true
        }); 
</code></pre>
