ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Expression Engine SafeCracker Format Datepicker

October 08, 2012 8:27am

Subscribe [2]
  • #1 / Oct 08, 2012 8:27am

    aa146214

    2 posts

    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?

  • #2 / Oct 09, 2012 5:48pm

    Shane Eckert

    7174 posts

    Hey there aa146214,

    Ha! I was not sure so I took a quick look around! BOOM.

    Nice work there!

    Is there anything else I can help with?

    Cheers,

  • #3 / Nov 20, 2012 6:04pm

    Shane Eckert

    7174 posts

    Hey there aa146214,

    Have not heard back from you in a bit.

    If you need anything else, please just let me know by opening a new thread. You can reference this one if that helps.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases