/ Published in: JavaScript
                    
                                        
Permet de préremplir des champs avec le premier et le dernier jour du mois courant au format jj/mm/aaaa
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth()+1;
var firstDay = "01";
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
document.form.dateDebut.value = firstDay+"/"+month+"/"+year;
document.form.dateFin.value = lastDay+"/"+month+"/"+year;
Comments
 Subscribe to comments
                    Subscribe to comments
                
                