Showing posts with label datepicker. Show all posts
Showing posts with label datepicker. Show all posts

Saturday, 28 June 2014

PHP - Mysql Get date between two date ranges

Fetching records between two date ranges
Between two years
SELECT * FROM `dt_tb` WHERE year( dt2 ) between 2004 and 2005
Between two month ranges. 
SELECT * FROM `dt_tb` WHERE month(dt) between '02' and '08'

SELECT * FROM `dt_tb` WHERE month(dt) between '02' and '08' and year(dt) between 2004 and 2005

Between two date ranges
SELECT * FROM `dt_tb` WHERE dt BETWEEN '2005-01-01' AND '2005-12-31' 

Friday, 20 June 2014

Dynamically Date Range reset in jQuery UI date picker

Removes the datepicker functionality completely. This will return the element back to its pre-init state. 
Code :
$( "#start_date" ).datepicker( "destroy" );
$( "#end_date" ).datepicker( "destroy" );