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

  • Home
  • SEARCH
  • 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 6318319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:37:32+00:00 2026-05-24T15:37:32+00:00

I have a range slider and I want it to display values from a

  • 0

I have a range “slider” and I want it to display values from a database beside it (times) as I move along it.
Below is what I have so far. The earliest and latest dates echo fine before the slider, so I know I’m getting them from the DB ok, but when I want them to show up beside the slider they don’t. I just get values from 0 to 100. Any ideas to fix this? Thanks

$sqltime = "SELECT Time FROM Test";
$resulttime = mysql_query($sqltime);

$vartime = array();
while ($rowtime = mysql_fetch_array($resulttime)) {
$bmsTime   = $rowtime['Time'];
//Convert Excel Timestamp of DB to Unix Timestamp
$unixtime=($bmsTime-25569)*86400;
$vartime[] =date('l jS \of F Y h:i:s A',($unixtime));
}


echo "Earliest Date:". ($vartime[0]) ."<br>";
$timemax=end($vartime);
echo "Latest Date:". ($timemax)."<br>";
echo "<input id='slider' type='range' min=\"$vartime[0]\" max=\"$timemax\" value=\"$vartime[0]\" step='any' />
<span id='range'> </span>";

?>
<script>
    var selectmenu=document.getElementById("slider");
    var valchanged;
    selectmenu.onchange=function changeval(){ 
    valchanged=selectmenu.value;
    document.getElementById("range").innerHTML=valchanged;
    } 
</script>
  • 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-24T15:37:32+00:00Added an answer on May 24, 2026 at 3:37 pm

    As pimvdb said, the range input type cannot take dates. It can only take floating-point numbers as per the spec.

    To achieve what you are after, you will likely have to use a third party JavaScript library or write your own implementation.

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

Sidebar

Related Questions

Suppose I have range from E2 to E16. How do I read values from
I have a range named STATE. I want to set data validation in range
Lets say I have a range between 0 and 100 and I want an
I have an List<int> which contains 1,2,4,7,9 for example. I have a range from
I want to create a pagination script using jquery UI's slider widget. So far
How do I copy a range of cells from Excel to Powerpoint. I want
I am creating a calculator based on the jQuery UI range slider and have
let's say I have a jQuery UI Slider like so: $(.mySlider).slider({ range: min, min:
I am using a price range, ie jquery range slider. And i have two
I have an image slider ( NivoSlider ) which simply fades through a range

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.