The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Merry Christmas, And Happy Testing
CharlesEF
post Dec 9 2021, 06:38 PM
Post #1


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Hi All,

I made this post to share my PHP calendar code. I only ask that any testing you do, please post back to this thread. This is a bare bones calendar, it doesn't do much. This will change in a future version. The 2 places where I didn't use PHP was for the month and day of the week names. I did this so I could show English (en) and Spanish (es) calendars. When unzipped you should have a 'temp' folder. Place it in your web server and load '/temp/calendar.php'. As is the calendar will show up in English.

Javascript is required. There are some variables you can change in 'calendar.php':
$firstDOW is the day of the week the calendar starts. Can be 0-6 (Sun - Sat).
$calLang is the calendar language, 'en' for English or 'es' for Spanish.
$fillBlanks is for showing the previous/next month dates (true) or not (false).

You shouldn't be able to do anything if the Year is blank or 0. Please test this code on any browser and report back your results.

Oh, the calendar is responsive so change your window size to see what happens. All my browsers only go down to 500px.


Thank you,

Charles
Attached File  calendar.zip ( 133.53k ) Number of downloads: 223


This post has been edited by CharlesEF: Dec 9 2021, 07:19 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jan 26 2022, 05:17 PM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Hi All,

I just want to post the final version of the calendar, after all the updates and tweaks. This zip also contains a Javascript version of the calendar. It will run with or without a web server. I post this hoping it may help anyone who needs to work with PHP or Javascript date objects. Or, how the Javascript version builds the calendar table.


Hope this helps,

Charles
Attached File  calendar.zip ( 145.29k ) Number of downloads: 203
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 04:46 PM