Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6106475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:05:00+00:00 2026-05-23T14:05:00+00:00

I made datepicker code, absolutely similar to http://jqueryui.com/demos/datepicker/#inline and i want to make news

  • 0

I made datepicker code, absolutely similar to http://jqueryui.com/demos/datepicker/#inline
and i want to make news calendar:

JS side:

$(document).ready(function(){
   $("#datepicker").datepicker({
       onSelect: function(dateText, inst) {
           window.open("?action=news_archive&date=" + dateText + "&lang=<?=$lang?>"); 
        }
     }
);

});

PHP side:

$date = $_GET[ "date" ];
mysql_query(SELECT * FROM news WHERE date = $date);

but when i refresh page, i’m able to link all pages what i pressed, and if there is similarity, it retrieves news, if not the page is empty. i want to filter and make url only if there is a record and this record is similar to my date in mysql database.

the url’s i have:

index.php?action=news_archive&date=2011-07-07&lang=eng

index.php?action=news_archive&date=2011-07-08&lang=eng

index.php?action=news_archive&date=2011-07-09&lang=eng

and so on…

but i don’t have news linked on 2011-07-08 and 2011-07-09 in my mysql database, so i don’t want to be linked 08 and 09 on my calendar.

sorry for my bed english and thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:05:00+00:00Added an answer on May 23, 2026 at 2:05 pm

    You will first need to bring a list of the dates from the db where there are news, and use that list to disable the calendar dates using the beforeShowDay event of the datepicker..

    $('.selector').datepicker({
       beforeShowDay: function(date) {
         // check if date is in the list and if so return [true]
         // or [false] if the date is not active..
       },
       onSelect: function(dateText, inst) {
           window.open("?action=news_archive&date=" + dateText + "&lang=<?=$lang?>"); 
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used this datepicker for quite awhile in this specific code. I made
I am using the datepicker binding made by rpn (http://www.knockmeout.net/2011/07/another-look-at-custom-bindings-for.html). I'm struggling a little
well im using this script right here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ and I have a multiMonth plugin
I made two date fields (pickup and dropin). And, I want to make sure
I have made a jQuery UI Datepicker script as below to select only Weekends.
I use rails 3.1, formtastic 2.0.2 and datepicker ui I made datepicker_input.rb: class DatepickerInput
I made a custom DatePicker that extends the android DatePicker UI component. I needed
I have a custom control (from MS Toolkit - DatePicker). I've made my own
I use jQuery datepicker with the following code $(.item).datepicker({ showWeek: true, firstDay: 1, minDate:
EDIT: I just made a jsfiddle to demonstrate the problem here: http://jsfiddle.net/GvjRd/3/ I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.