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

rating

Date Picker Problem

Thread began 4/14/2010 3:10 am by Daryl | Last modified 4/14/2010 5:21 am by Daryl | 637 views | 2 replies |

DarylBeta Tester

Date Picker Problem

I have a problem with a date picker. I am using it to select a date of birth, however I have found that if I select an incorrect date and then try to select a year which is after the year that I selected I am unable to do so as no years beyond this year are shown...

So if I select 1977 but then change my mind an want to select 1978 I am unable to select 1978 as years upto 1977 are shown.

Sign in to reply to this post

neilo

Hi Daryl,

Does this happen with every instance of date picker, or just on this one page? How was this one installed, (i.e. through CSS Formbuilder)? What happens if you create just a datepicker field on a fresh page using CSSFormBuilder, do you get the same error?

I can't seem to get mine to fault in the way yours does. I created a single field and changed the date range, and tested choosing one mm/dd/yyyy, and then changed it to a year later and subsequently several later dates.

Do you have just the one datepicker in your form, or two (perhaps a start date and an end date) because there was some custom code linked to in which the options of one date depended on the value of the other that had some glitches in practice.

I'm assuming you have added a line to the page script to give a custom date range. Perhaps you could change the range and see if that makes any difference?

The datepicker javascript page code produced for me by CSSFB is:

<script type="text/javascript">
$(function(){
$('#fieldset_group_date').datepicker({
changeMonth: true,
changeYear: true,
yearRange: '1950:2025',
onClose: closeDatePicker_fieldset_group_date
});
});
function closeDatePicker_fieldset_group_date() {
var tElm = $('#fieldset_group_date');
if (typeof fieldset_group_date_Spry != null && typeof fieldset_group_date_Spry != "undefined") {
fieldset_group_date_Spry.validate();
}
var docElm = document.getElementById("fieldset_group_date");
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>


apart from the line specifying a date range (in blue).

Do you have a page you could link to where we can see this behaviour?

If you get completely stuck, you could try one of the examples here.

Sign in to reply to this post

DarylBeta Tester

Nelio

The problem was the custom code that I had used for the date range.

Thank you for posting yours as I borrowed that one line of code which rectified my problem.

Thanks again

Sign in to reply to this post

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...