date of birth fix/js?

Hello all!

I am searching for an elusive answer to fix the birth date default format in Dolphin ( I am using 6.1.6). I have to ask this question below, because I am not that familar with js. I found this code on my Join page for Dolphin. Can someone who know js confirm that I change the format to m/d/year instead of d/m/yy so I can be rid of the defualt birth date format? The code is below:

 

type="text/javascript" language="JavaScript" 

 language="JavaScript" src="inc/js/join.js"></script>
 <script type="text/javascript" language="JavaScript">
  $( document ).ready( function(){
   
   $( '.input_date' ).datepicker({
    dateFormat: 'd/m/yy',
    yearRange: '1933:1991',
    mandatory: true,
    closeText: 'X',
    defaultDate: -6575
   });
   
  } );
 </script>

 

and change to this:

 

  $( '.input_date' ).datepicker({
    dateFormat: 'm/d/yy',
    yearRange: '1933:1991',
    mandatory: true,
    closeText: 'X',
    defaultDate: -6575
   });
   
  } );
 </script>

 

Will this work and do I need to change or modify anything else?

 

Thanks!

 

 

Quote · 13 Jul 2009

Not sure exactly what you are after but the file you seek is:

/templates/base/scripts/BxBaseConfig.php

At the very bottom of the file you will find the code you are looking for:
$this -> customize['join']['datepickerInit'] = "
$( '.input_date' ).datepicker({
dateFormat: 'd/m/yy',
yearRange: '{min_year}:{max_year}',
mandatory: true,
closeText: 'X',
defaultDate: -{dfl_days}
});

Change to:

dateFormat: 'm/d/yy',

Save file and reupload. That will take care of the join.php calandar picker, but also update the admin panel builder for the text that says please ender d/m/y format to m/d/y.

If you are looking for a quick fix to everywhere in dolphin to display this same format you may have to continue looking around as I don't think this will take care of it all, but it will take care of the join form(join.php).

gameutopia

DialMe.com - Your One and Only Source For Boonex Dolphin Tutorials and Resources
Quote · 14 Jul 2009

Gametupia:

That's what I was about to post. Perfect! At the moment, I am having my site intergrated with the web pages I created with Dolphin. I will make this change and will post what happens when I do that on the Join page. At the very least it will work on the Join page. I will need it to occur throughtout my Dolphin site (i.e., Profile page). Also, to change the text description to say enter m/d/yy format on the Join page.

 

To have this occur throughout my site reagrding the datepicker, I will probably need to change any format to say m/d/yy (parsedate) in this file:

 

/plugins/jquery/ui.datepicker.js

Plus, the long and short dates in the admin panel.

 

And anything that effects the database.

 

Also, I found out who created the date picker (see the link below) and incidentally the default format is year/month/day (you can also see the defualt format in your php panel), so someone on the Boonex team changed it to day/month/year goofy format and could easily provide us all the answer to this elusive answer and save us all a lot of time changing this.

 

http://marcgrabanski.com/pages/code/jquery-ui-datepicker

 

I sent the creator an email asking this question and hopefully he'll get back to me. In the meantime, I'll look thru their documention.

 

I know I'm on the right track and hopefully get a complete answer for everyone soon :)!

Quote · 14 Jul 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.