السلام عليكم ،، مرفق يا اخوان ملف فيه صفحة HTML وعنصر جافا ، عند الظغط على زر الاستدعاء يظهر في مربع النص 2008-7-22 السؤال كيف اعدله ليظهر بالطريقة 22-7-2008
التاريخ في جافا
عليكم السلام _
اولا يبدوا انك نسيت ارفاق الكود
ثانيا اذا كنت تستخدم الكود في هذه الصفحة http://www.javascriptkit.com/script/script...gcalendar.shtml فاتبع الاتي
1 - استبدل الفنكشن FormatDate بلفنكشن التالية
function FormatDate(pDate)
{
if (this.Format.toUpperCase()=="DDMMYYYY")
return (pDate+DateSeparator+(this.Month+1)+DateSeparator+this.Year);
else if (this.Format.toUpperCase()=="YYYYMMDD")
return (this.Year+DateSeparator+(this.Month+1)+DateSeparator+pDate);
else if (this.Format.toUpperCase()=="DDMMMYYYY")
return (pDate+DateSeparator+this.GetMonthName(false)+DateSeparator+this.Year);
else if (this.Format.toUpperCase()=="MMDDYYYY")
return ((this.Month+1)+DateSeparator+pDate+DateSeparator+this.Year);
else if (this.Format.toUpperCase()=="MMMDDYYYY")
return (this.GetMonthName(false)+DateSeparator+pDate+DateSeparator+this.Year);
}و انتبه من هذا الامر لا تغيره Calendar.prototype.FormatDate=FormatDate;
2 - في كود ال HTML استبدل الامر
<a href="java script:NewCal('demo1','DDMMYYYY')">بالامر
<a href="java script:NewCal('demo1','YYYYMMDD')">وبالتوفيق