Hello mamba!
define("_SHORTDATESTRING","d-m-Y");
it's true! The translation removed the "-".
Changing the file "languages/english/global.php":
define ( "_SHORTDATESTRING" , "????" );
with:
define("_SHORTDATESTRING","d-m-Y");
For extcal the solution is:
Edit "post.php". Remove the lines:
// If the date format is wrong
if(! preg_match ( '`[0-9]{4}-[01][0-9]-[0123][0-9]`' , $_POST [ 'event_start' ][ 'date' ]) || ! preg_match ( '`[0-9]{4}-[01][0-9]-[0123][0-9]`' , $_POST [ 'event_end' ][ 'date' ])) {
redirect_header ( 'index.php' , 3 , _MD_EXTCAL_WRONG_DATE_FORMAT . "
" . implode ( '
' , $GLOBALS [ 'xoopsSecurity' ]-> getErrors ()));
exit;
}
Edit "class/event.php". Remove the lines:
list( $year , $month , $day ) = explode ( "-" , $data [ 'event_start' ][ 'date' ]);
$data [ 'event_start' ] = mktime ( 0 , 0 , 0 , $month , $day , $year ) + $data [ 'event_start' ][ 'time' ];
list( $year , $month , $day ) = explode ( "-" , $data [ 'event_end' ][ 'date' ]);
$data [ 'event_end' ] = mktime ( 0 , 0 , 0 , $month , $day , $year ) + $data [ 'event_end' ][ 'time' ];
if( $data [ 'have_end' ] == 0 || $data [ 'event_start' ] > $data [ 'event_end' ]) {
$data [ 'event_end' ] = $data [ 'event_start' ];
}
add these lines instead
$data [ 'event_start' ] = strtotime ( $data [ 'event_start' ][ 'date' ]) + $data [ 'event_start' ][ 'time' ];
$data [ 'event_end' ] = strtotime ( $data [ 'event_end' ][ 'date' ]) + $data [ 'event_end' ][ 'time' ];
Edit "class/event.php". Remove the lines:
// If the date format is wrong
if(! preg_match ( '`[0-9]{4}-[01][0-9]-[0123][0-9]`' , $_POST [ 'event_start' ][ 'date' ]) || ! preg_match ( '`[0-9]{4}-[01][0-9]-[0123][0-9]`' , $_POST [ 'event_end' ][ 'date' ])) {
redirect_header ( 'index.php' , 3 , _MD_EXTCAL_WRONG_DATE_FORMAT . "
" . implode ( '
' , $GLOBALS [ 'xoopsSecurity' ]-> getErrors ()));
exit;
}