Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:04:55+00:00 2026-06-12T12:04:55+00:00

Hi I am making a form in expression engine using safecracker and one of

  • 0

Hi I am making a form in expression engine using safecracker and one of my fields called “date of birth” uses the date field type. The jQuery datapicker is being automatically added by expression engine but I can’t see how to add any of the options or formatting I would normally add to datepicker when making a field of this type.

My normal code:

 $(function() {
    $( "#datepicker" ).datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'dd/mm/yy',
        maxDate: new Date()
    });
 });

The only option I can think of is to make this field a text input and add the datepicker myself in the template but this would remove EE’s date validation that it performs on this field type.

Is there anyway to add additional datepicker options to this field type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:04:57+00:00Added an answer on June 12, 2026 at 12:04 pm

    Well, you can set datepicker="no" in your Safecracker tag, then add your javascript manually. However: you can’t use your custom format as you show above – for the input to validate as a native EE date field, it must use the datePicker format yy-mm-dd, plus the current time in the format HH:MM AM/PM – which the datePicker doesn’t do natively. (See this post by one of EE’s developers for how they do this.)

    An alternative would be to instead use the EEvent Helper date field, because it does not require the time portion to validate (though it too requires yy-mm-dd). However, datepicker="no"only affects native date fields, so you’d instead have to set safecracker_head="no" – but then you’ll also lose any javascript or CSS required by other fieldtypes in your form.

    Re: using a plain text field: in addition to the validation issue, your data would then be stored as whatever is input (mm/dd/yy), instead being converted a timestamp, which is far more useful and portable.

    The only true solution is to write your own date fieldtype for this. Wouldn’t be very difficult.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making form validation and when user doesn't fill one of required fields
I'm making a form that I'm using the amazing JQuery validation plugin for (
I'm making a form where a teacher creates questions. One type of question is
I need some help regarding making a form using PHP, MySQL, and jQuery. Here
I'm making a form for user creation, and I want to give one or
I am making a website and I have made a form fields like email
I am making form in PHP and submitting using javascript. I want to get
I'm making a form and would like text input field to be inside of
I'm making a slide-down login-form that is submitted with the jQuery ajax.form plugin. The
I am making a form to a string and so, using 2 arrays, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.