Jump to content

I have an inline datepicker(calendar) on my website. when i load the page, i do a query to fetch all events from mysql database.

For every date fetched from the database, i change the color style of the date dynamically.

Here's the code i'm using :

var datetoday = new Date().getDate();
var date = $("#inline-datepicker .datepicker .datepicker-days table tbody tr>td:contains([datefromthequery])").html();
if(date == datetoday){
 //change the color style of the date to red.
}else{
// change the color style of the date to green
}

 

Here's the problem. When i insert an event with a single digit date and reload the page. All dates that contain that single digit date inserted are changed in style.

Can anyone help me do the workaround for this bug? Thanks.

Link to comment
https://linustechtips.com/topic/551330-jqueryphp-calendar-issue/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×