close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

DatePicker Suggestions

Thread began 3/12/2012 9:45 pm by neo314 | Last modified 3/13/2012 11:32 am by neo314 | 676 views | 1 replies

neo314

DatePicker Suggestions

Hi,

I'm using WA DatePicker directly rather than through form builder today and I have a couple of suggestions.

In addition to the earlier Template discussion, it would be great if the behavior allowed an initial value and even handled the formatting of the initial value, e.g.:

value="<?php echo ($rs["mydate"])?date("m/d/Y",strtotime($rs["mydate"])):""; ?>"

Also, I think the code could be improved by changing the close function to accept any element like so:

<script type="text/javascript">
$(function(){
$('#mydate').datepicker({
dateFormat: 'mm/dd/yy',
showAnim: 'show',
onClose: closeDatePicker("mydate")
});
});
function closeDatePicker(eid) {
var tElm = $("#"+eid);
if (typeof datepicker_1_Spry != null && typeof datepicker_1_Spry != "undefined") {
datepicker_1_Spry.validate();
}
var docElm = document.getElementById(eid);
var tBlur = docElm.getAttribute("onBlur");
if (!tBlur) tBlur = docElm.getAttribute("onblur");
if (!tBlur) tBlur = docElm.getAttribute("ONBLUR");
if (tBlur) {
tBlur = tBlur.replace(/\bthis\b/g, "docElm");
eval(tBlur);
}
}
</script>

I'm not sure why the extension code does not stay with jQuery (document.getElementById) but if it could it should. I assume there is a good reason for this.

It would be really nice if the behavior were editable through the GUI. I also see that WA adds some files under webassist/datepicker/edit_datepicker1, so a second parameter may be necessary to have different styled or validated fields on one form.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...