close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Data Bridge - Forms - Datepicker

Thread began 11/11/2012 6:27 am by thehalpeen319342 | Last modified 3/05/2015 6:26 pm by bjgarner241692 | 2648 views | 14 replies |

thehalpeen319342

Data Bridge - Forms - Datepicker

Dear Support, How, I want to create a datepicker so people cam enter their birth dates. Currently the calendar I select in CSS Form Builder presents me with a calendar where the years goes back to 2002 and forward to 2022 - a range of twenty years. How I do I increase the range - I want the years to go back to say 1900 and I also want to prevent future dates being picked - no need for future dates for birthdays.

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to edit the date picker code on your page and add maxDate and minDate settings.

see the following page for details:
#option-maxDate

Sign in to reply to this post

thehalpeen319342

Jason, Do you mean edit by hand code the Datepicker Widget page - or is there something in Web Assist?

Sign in to reply to this post

Jason ByrnesWebAssist

the minDate and maxDate settings need to be added by hand.

Sign in to reply to this post

thehalpeen319342

ok, I'll give it a try.

Sign in to reply to this post

thehalpeen319342

Okay Jason - you need to be clearer - where is all this code to be found. I've looked in all the pages and can't find it. I've done this kind of stuff in Dreamweaver, with widgets I downloaded and in my opinion it's easier to format - see attached code from a widget I downloaded. WebAssist is supposed to make this kind of stuff easier - or so I thought. Here with WebAssist we have a calendar widget and I can't find the code to make the adjustments - Why present a calendar in a default state that covers only 20 years without explaining adequately how to change it?

Attached Files
sample.txt
Sign in to reply to this post

Jason ByrnesWebAssist

this page is not using the webassist date picker.

the page you sent is using another companies date picker:
calendar_datepicker.php


you will need to refer to their documentation for setting the minimum and maximum dates.

the webassist datepicker uses jquery

Sign in to reply to this post

thehalpeen319342

Jason, that was just a sample of another datepicker i decided to send you, showing you how easy it was to adjust the code on that particular one.

What I need is the name of the page where the the Data Bridge dickpicker code is located so I can adjust the dates. What I'm finding is that the learning curve is quite steep with the WebAssist products. They're great when you know how to use them and you understand them, but it seems to take a while to learn

Sign in to reply to this post

Jason ByrnesWebAssist

the date picker is based pon jquery.

when you add a datepicker to the page, it will add a code block siomilar to this one:

php:
$(function(){

    $('#datepicker_1').datepicker({
        dateFormat: 'mm/dd/yy',
        showAnim: 'show',
        onClose: closeDatePicker_datepicker_1
    });
});




this code block allows you to specify date picker options.

you can add the max and minDate options, for example:

php:
$(function(){

    $('#datepicker_1').datepicker({
        dateFormat: 'mm/dd/yy',
        changeYear: true,
        maxDate: 0,
        minDate: new Date(1950, 1 - 1, 1),
        showAnim: 'show',
        onClose: closeDatePicker_datepicker_1
    });
});




for a listing of other options that can be added see the jquery documentation:
datepicker/

Sign in to reply to this post

thehalpeen319342

Ok, I have done what you said, and I've managed to to prevent future dates from being selected. However, I entered in 1950, as the min date, but it has no effect on the calendar - see attached.

Just for the hell of it, I changed the MaxDate from 0 to 2014, and when I loaded the page, the future dates went up to 2018- not 2014 as expected.

Am I not getting something?

Attached Files
register1.zip
Sign in to reply to this post
loading

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