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 8310707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:33:33+00:00 2026-06-08T19:33:33+00:00

I am searching for a dynamic day of week select. So the code would

  • 0

I am searching for a dynamic day of week select.

So the code would recognise today is August 1st so… would work like so.

So code ( how I would like it to perform )

<select id="selectday" name="selectday" tabindex="13">
<option value="">Please select Preferred Day</option>
<option value="">Today Wed 1st Aug</option>
<option value="">Thursday 2nd Aug</option>
<option value="">Friday 3rd Aug</option>
<option value="">Saturday 4th Aug</option>
<option value="">Sunday 5th Aug</option>
</select>

Also would like if possible to factor, if current time is => 12.00pm then Today ( becomes unavailable as an option )

Does this make sense ?

Just wondered if anyone has seen anything like this and how to do it ? Prefer jquery but I suppose php would be fine.

I see plenty of date and time pickers specifically Trents https://github.com/trentrichardson/jQuery-Timepicker-Addon

But I need something very very simple and lightweight.

Only needs to show either 7 day block or 14 day block. Would prefer if Sunday was not an option , but that isnt a major issue.

  • 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-06-08T19:33:34+00:00Added an answer on June 8, 2026 at 7:33 pm

    Something like this should get you started… (Tested example)

    <select id="selectday" name="selectday" tabindex="13">
    <?php
        $IncludeToday = date("G") < 12;
        for($i=($IncludeToday?0:1);$i<=7;$i++) {
            $TargetDate = strtotime(date("Y-m-d") . " +{$i} day");
            print "<option value=\"" . date("Y-m-d", $TargetDate) . "\">" . date("l jS F", $TargetDate) . "</option>\n";
        }
    ?>
    </select>
    

    This takes the current date in the format Y-m-d and uses strtotime() to parse an offset of + n days. Then, we output an option with the proper display format and a machine-readable y-m-d in the value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm still searching solution for getting values from dynamic created object. Follwing code generates
I would like to create dynamic sorting for my mysql database results. I currently
<?php $q=select * from students where (dynamic for user searching) $qry=mysql_fetch_array($q); while($row=mysql_fetch_array()) { **//
I'm searching a way to avoid systematic dynamic cast in the following problem. I
Searching for values that uses the same value Example SELECT Name, UnitPrice, Quantity, Color
Searching from google.com, like www.abc.com Search Result Rank the pages like Title..... Description... www.abc.com
I'm searching info about configuring own MetaData in asp.NET Dynamic Site. For example. I
I'm searching since one week and couldn't find a proper solution for my problem.
I'm searching for good explanation about making dynamic dialog --menu box in bash. I'm
I have started using the entity framework for a web application and would like

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.