diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index dabbf142730..752a756b8cb 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -944,7 +944,7 @@ if ($rowid > 0)
$datefrom=$object->datevalid;
}
}
- $form->select_date($datefrom,'','','','',"cotisation",1,1);
+ print $form->select_date($datefrom,'','','','',"cotisation",1,1,1);
print "";
// Date end subscription
@@ -957,7 +957,7 @@ if ($rowid > 0)
$dateto=-1; // By default, no date is suggested
}
print '
'.$langs->trans("DateEndSubscription").' ';
- $form->select_date($dateto,'end','','','',"cotisation");
+ print $form->select_date($dateto,'end','','','',"cotisation",1,0,1);
print " ";
if ($adht->cotisation)
@@ -1058,7 +1058,7 @@ if ($rowid > 0)
// Date of payment
print ''.$langs->trans("DatePayment").' ';
- $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1);
+ print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1);
print " \n";
print ''.$langs->trans('Numero');
diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php
index b9335e80446..02465625478 100644
--- a/htdocs/cashdesk/tpl/facturation1.tpl.php
+++ b/htdocs/cashdesk/tpl/facturation1.tpl.php
@@ -206,8 +206,8 @@ $langs->load("cashdesk");
" onclick="javascript: verifClic('DIF');" />
trans("DateEcheance").' :';
- print $form->select_date(-1,'txtDatePaiement');
+ print $langs->trans("DateEcheance").' :';
+ print $form->select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1);
?>
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 631cb8ebd3b..82cf9bf168d 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1372,7 +1372,6 @@ if ($action == 'create' && $user->rights->commande->creer)
}
// Date
print '' . $langs->trans('Date') . ' ';
- //$form->select_date($dateorder, 're', '', '', '', "crea_commande", 1, 1);
$form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
print ' ';
diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php
index 02a3bc82e19..083aeb48986 100644
--- a/htdocs/compta/deplacement/card.php
+++ b/htdocs/compta/deplacement/card.php
@@ -262,7 +262,7 @@ if ($action == 'create')
print "";
print ''.$langs->trans("Date").' ';
- print $form->select_date($datec?$datec:-1,'','','','','add',1,1);
+ print $form->select_date($datec?$datec:-1,'','','','','add',1,1,1);
print ' ';
// Km
@@ -358,7 +358,7 @@ else if ($id)
// Date
print ''.$langs->trans("Date").' ';
- print $form->select_date($object->date,'','','','','update');
+ print $form->select_date($object->date,'',0,0,0,'update',1,0,1);
print ' ';
// Km
@@ -433,7 +433,7 @@ else if ($id)
print '';
$form->load_cache_types_fees();
-
+
// Type
print '';
print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 65529079d39..087780fdaad 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2273,7 +2273,7 @@ if ($action == 'create')
// Date invoice
print ' ' . $langs->trans('Date') . ' ';
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
- $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1);
+ print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1);
print ' ';
// Payment term
@@ -2457,12 +2457,12 @@ if ($action == 'create')
print '';
print $langs->trans('From') . ' ';
print ' ';
- print $form->select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add");
+ print $form->select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
print ' ';
print '';
print $langs->trans('to') . ' ';
print ' ';
- print $form->select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add");
+ print $form->select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1);
print ' ';
print '';
}
diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php
index bafa20aa84f..aea7579007a 100644
--- a/htdocs/compta/paiement/cheque/card.php
+++ b/htdocs/compta/paiement/cheque/card.php
@@ -386,7 +386,7 @@ if ($action == 'new')
//print ''.$langs->trans('Date').' '.dol_print_date($now,'day').' ';
// Filter
print ''.$langs->trans("DateChequeReceived").' ';
- print $form->select_date($filterdate,'fd',0,0,1,'',1,1);
+ print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1);
print ' ';
print ''.$langs->trans("BankAccount").' ';
$form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1);
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index 4d0451285b1..0278a864c2f 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -635,11 +635,11 @@ else
$form=new Form($db);
if ($object->birthday)
{
- print $form->select_date($object->birthday,'birthday',0,0,0,"perso");
+ print $form->select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1);
}
else
{
- print $form->select_date('','birthday',0,0,1,"perso");
+ print $form->select_date('','birthday',0,0,1,"perso", 1, 0, 1);
}
print ' ';
@@ -1156,7 +1156,7 @@ else
print $langs->trans("VCard");
print '';
print ' ';
-
+
print "";
print dol_fiche_end();
diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php
index 19213ca049f..8f4e97e690d 100644
--- a/htdocs/contact/perso.php
+++ b/htdocs/contact/perso.php
@@ -129,7 +129,7 @@ if ($action == 'edit')
// Date To Birth
print ''.$langs->trans("DateToBirth").' ';
$form=new Form($db);
- print $form->select_date($object->birthday,'birthday',0,0,1,"perso");
+ print $form->select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1);
print ' ';
print ''.$langs->trans("Alert").': ';
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 6bf7dcaeacc..4005cb9abdf 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1687,11 +1687,11 @@ else
}
print ' '.$langs->trans("DateServiceActivate").' ';
- print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active");
+ print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1);
print ' ';
print ''.$langs->trans("DateEndPlanned").' ';
- print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active");
+ print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1);
print ' ';
print '';
@@ -1744,7 +1744,7 @@ else
if ($objp->statut == 4)
{
print $langs->trans("DateEndReal").' ';
- $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1);
+ print $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1);
}
}
print ' ';
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index fe89907279c..eedb0183759 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -191,14 +191,14 @@ if ($resql)
print $form->selectarray('filter_op1',$arrayofoperators,$filter_op1,1);
print ' ';
$filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year);
- print $form->select_date($filter_date1,'op1',0,0,1);
+ print $form->select_date($filter_date1,'op1',0,0,1,'',1,0,1);
print '';
print '';
$arrayofoperators=array('<'=>'<','>'=>'>');
print $form->selectarray('filter_op2',$arrayofoperators,$filter_op2,1);
print ' ';
$filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year);
- print $form->select_date($filter_date2,'op2',0,0,1);
+ print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1);
print ' ';
print ' ';
print ' ';
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index fad1af3c082..8b56049fe7f 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -347,9 +347,9 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da
else
{
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
- echo $form->select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct");
+ echo $form->select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1);
echo ' '.$langs->trans('to').' ';
- echo $form->select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct");
+ echo $form->select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1);
}
?>
diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php
index 51ded55f1c7..e38b8f873bd 100644
--- a/htdocs/core/tpl/objectline_edit.tpl.php
+++ b/htdocs/core/tpl/objectline_edit.tpl.php
@@ -222,9 +222,9 @@ $coldisplay=-1; // We remove first td
trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:'');
- echo $form->select_date($line->date_start,'date_start',$hourmin,$hourmin,$line->date_start?0:1,"updateligne");
+ echo $form->select_date($line->date_start,'date_start',$hourmin,$hourmin,$line->date_start?0:1,"updateligne",1,0,1);
echo ' '.$langs->trans('to').' ';
- echo $form->select_date($line->date_end,'date_end',$hourmin,$hourmin,$line->date_end?0:1,"updateligne");
+ echo $form->select_date($line->date_end,'date_end',$hourmin,$hourmin,$line->date_end?0:1,"updateligne",1,0,1);
?>
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 88661bf090f..90b4589470a 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -542,7 +542,7 @@ if ($action == 'create')
print '';
//print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed.
$date_delivery = ($date_delivery?$date_delivery:$object->date_livraison); // $date_delivery comes from GETPOST
- print $form->select_date($date_delivery?$date_delivery:-1,'date_delivery',1,1);
+ print $form->select_date($date_delivery?$date_delivery:-1,'date_delivery',1,1,1);
print " \n";
print '';
@@ -1059,7 +1059,7 @@ else if ($id || $ref)
print '';
}
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 1f6d6533944..27a33216865 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -2216,9 +2216,9 @@ elseif (! empty($object->id))
print ' ';
print $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
- print $form->select_date($date_start,'date_start'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'');
+ print $form->select_date($date_start,'date_start'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1);
print ' '.$langs->trans('to').' ';
- print $form->select_date($date_end,'date_end'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'');
+ print $form->select_date($date_end,'date_end'.$date_pf,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,'',1,0,1);
print '';
print '';
@@ -2790,7 +2790,7 @@ elseif (! empty($object->id))
//print ' '.$langs->trans("ToOrder").' ';
print ''.$langs->trans("OrderDate").' ';
$date_com = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
- print $form->select_date($date_com,'',1,1,'',"commande");
+ print $form->select_date($date_com,'',1,1,'',"commande",1,0,1);
print ' ';
print ''.$langs->trans("OrderMode").' ';
@@ -2817,7 +2817,7 @@ elseif (! empty($object->id))
print '';
//print ''.$langs->trans("Receive").' ';
print ''.$langs->trans("DeliveryDate").' ';
- print $form->select_date('','',1,1,'',"commande");
+ print $form->select_date('','',1,1,'',"commande",1,0,1);
print " \n";
print "".$langs->trans("Delivery")." \n";
diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php
index ad32f7b6ced..2eec1695887 100644
--- a/htdocs/loan/card.php
+++ b/htdocs/loan/card.php
@@ -46,7 +46,7 @@ $object = new Loan($db);
/*
* Actions
*/
-
+
// Classify paid
if ($action == 'confirm_paid' && $confirm == 'yes')
{
@@ -86,7 +86,7 @@ if ($action == 'add' && $user->rights->loan->write)
{
$datestart=@dol_mktime(12,0,0, $_POST["startmonth"], $_POST["startday"], $_POST["startyear"]);
$dateend=@dol_mktime(12,0,0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
-
+
if (! $datestart)
{
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("DateStart")), 'errors');
@@ -218,13 +218,13 @@ if ($action == 'create')
// Date Start
print " ";
print ''.$langs->trans("DateStart").' ';
- print $form->select_date($datestart?$datestart:-1,'start','','','','add',1,1);
+ print $form->select_date($datestart?$datestart:-1,'start','','','','add',1,1,1);
print ' ';
// Date End
print "";
print ''.$langs->trans("DateEnd").' ';
- print $form->select_date($dateend?$dateend:-1,'end','','','','add',1,1);
+ print $form->select_date($dateend?$dateend:-1,'end','','','','add',1,1,1);
print ' ';
// Number of terms
@@ -356,7 +356,7 @@ if ($id > 0)
print "";
if ($action == 'edit')
{
- print $form->select_date($object->datestart, 'start', 0, 0, 0, 'update', 1);
+ print $form->select_date($object->datestart, 'start', 0, 0, 0, 'update', 1, 0, 1);
}
else
{
@@ -369,7 +369,7 @@ if ($id > 0)
print " ";
if ($action == 'edit')
{
- print $form->select_date($object->dateend, 'end', 0, 0, 0, 'update', 1);
+ print $form->select_date($object->dateend, 'end', 0, 0, 0, 'update', 1, 0, 1);
}
else
{
@@ -402,7 +402,7 @@ if ($id > 0)
print ' ';
print '';
print '';
- }
+ }
dol_fiche_end();
diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php
index 3831f73a7ea..41de056dce5 100644
--- a/htdocs/loan/document.php
+++ b/htdocs/loan/document.php
@@ -123,7 +123,7 @@ if ($object->id)
print " ";
if ($action == 'edit')
{
- print $form->select_date($object->datestart, 'start', 0, 0, 0, 'loan', 1);
+ print $form->select_date($object->datestart, 'start', 0, 0, 0, 'loan', 1, 0, 1);
}
else
{
@@ -137,7 +137,7 @@ if ($object->id)
print " ";
if ($action == 'edit')
{
- print $form->select_date($object->dateend, 'end', 0, 0, 0, 'loan', 1);
+ print $form->select_date($object->dateend, 'end', 0, 0, 0, 'loan', 1, 0, 1);
}
else
{
diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php
index 90f029b4d35..bd0d2cb8a51 100644
--- a/htdocs/opensurvey/card.php
+++ b/htdocs/opensurvey/card.php
@@ -287,7 +287,7 @@ print ' ';
// Expire date
print ''.$langs->trans('ExpireDate').' ';
-if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire');
+if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1);
else print dol_print_date($object->date_fin,'day');
print ' ';
diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php
index ee19d321301..d9ef51b6a4a 100644
--- a/htdocs/opensurvey/results.php
+++ b/htdocs/opensurvey/results.php
@@ -458,7 +458,7 @@ print '';
// Expire date
print ''.$langs->trans('ExpireDate').' ';
-if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire');
+if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1);
else print dol_print_date($object->date_fin,'day');
print ' ';
diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php
index 9c5d27d070e..61c3cd6dff6 100644
--- a/htdocs/opensurvey/wizard/create_survey.php
+++ b/htdocs/opensurvey/wizard/create_survey.php
@@ -101,7 +101,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre"))
if (! $testdate) {
setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("ExpireDate")), 'errors');
}
-
+
if ($titre && $testdate)
{
if (! empty($creation_sondage_date))
@@ -156,7 +156,7 @@ print ''."\n";
print ''. $langs->trans("ExpireDate") .' ';
-print $form->select_date($champdatefin?$champdatefin:-1,'champdatefin','','','',"add",1,0);
+print $form->select_date($champdatefin?$champdatefin:-1,'champdatefin','','','',"add",1,0,1);
print ' '."\n";
print '
'."\n";
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index f80050287e9..44b17cac98f 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -747,10 +747,10 @@ if ($resql)
print '