Questions tagged [maxdate]

143 questions
64
votes
2 answers

how to get min or max dates from a list of dates using moment.js?

I want to have the max date from the list of dates given in the handleClick function. How to find the max date from the list of dates using moment.js? I have the following code: import React, {Component} from 'react'; import moment from…
Subhojit
  • 1,389
  • 8
  • 19
  • 33
18
votes
4 answers

jQuery datepicker mindate, maxdate

I have the two following datepicker objects but I can't get what I want as I am getting stuck with the minDate and maxDate options: This is to restrict the dates to future dates. What I want: restrict the dates from current date to 30 years…
Amra
  • 24,780
  • 27
  • 82
  • 92
16
votes
2 answers

Android DatePicker shows unavailable months when using min/max limits

I've only found 1 other instance of this issue on StackOverflow which was unanswered (last year), so I figured I'd give it another shot. (Android DatePicker/Dialog displaying incorrect month/s using min/max date, with an actual image) When setting…
Kevin
  • 183
  • 8
11
votes
0 answers

iOS: UIDatePicker "remove" dates outside min and max dates

I have coded a simple UIDatePicker with minimum and max dates. I want the datepicker to NOT show the unavailable dates, not only disable them. Actual: you are able to scroll through all the unavailable dates, but when you rest on an unavailable…
B-Man
  • 2,209
  • 3
  • 22
  • 35
11
votes
6 answers

jQuery DatePicker Min Max dates

I have the jQuery date picker setup and working but would like help with setting the minDate and maxDate options. My current code is below (without these options). How can I set the minDate as 3 months before the defaultDate, and maxDate as 28days…
Rob
  • 738
  • 3
  • 10
  • 23
8
votes
2 answers

Remove minDate/maxDate limits in jQuery UI Datepicker

A simple issue, but I can't seem to find the answer. I've limited the date range in jQuery Datepicker: $( "#MyDatepicker" ).datepicker( "option", "minDate", new Date()) Is there a way to remove all restrictions for date range?
Earl Grey
  • 95
  • 1
  • 1
  • 4
6
votes
0 answers

What will happen after '2038-01-19 03:14:07' UTC

The Mysql document says that The TIME STAMP data type is used for values that contain both date and time parts. TIME STAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC. In our db,most of the time field are TIME…
Patato
  • 1,464
  • 10
  • 12
6
votes
7 answers

jquery datepicker range (mindate maxdate) is not working

I'm trying to set a range for a jquery datepicker that I have on my form but when I open the form it allows me to select any date.
silvster27
  • 1,916
  • 6
  • 30
  • 44
3
votes
3 answers

Get the max column value for each unique ID

I have two tables, a customers and orders table. The customers table contains a unique ID for each customer. It contains 1141 entries. The orders table contains many entries with a customerID and a date. I am trying to query my database and return a…
Kenta
  • 369
  • 1
  • 10
  • 30
3
votes
3 answers

bootstrap datetimepicker - set maxDate relative to now?

I use this datetimepicker: http://eonasdan.github.io/bootstrap-datetimepicker/Options/ Basically I want to set maxDate: moment(), i.e maxDate should be limited to now. The problem is by the time the datepicker is opened maxDate is not now() anymore.…
3
votes
3 answers

How can I set the minDate/maxDate for jQueryUI Datepicker using a string?

jQueryUI Datepicker documentation states that the minDate option can be set using "a string in the current dateFormat". So I've tried the following to initialize datepickers: $("input.date").datepicker({ minDate: "01/01/2010", maxDate: "12/31/2010"…
leo
  • 71
  • 1
  • 2
  • 6
3
votes
2 answers

PostgreSQL: Get the second to last MAX(date)

I have two views in PostgreSQL. One to get the most recent total amounts of each organization. The other view is to get the second to last most recent total amounts of each organization and here is the problem: How to get the second to last…
user2213250
  • 33
  • 1
  • 3
2
votes
2 answers

SQL Server last date

Is there an option for getting the row with the highest date without joining the same table and use max(date) ?? Is Top1 order by desc a valid option ? I use SQL Server 2000. And performance is important. edit: Table1: columns: part -…
BBAA
  • 55
  • 1
  • 5
2
votes
3 answers

Max date over each item

I have a table that simplified looks like this: WITH TBL (ITEM, COST, DAY) AS ( SELECT 'A', 6, TO_DATE('2019-08-13', 'YYYY-MM-DD') FROM DUAL UNION ALL SELECT 'B', 4, TO_DATE('2019-08-21', 'YYYY-MM-DD') FROM DUAL UNION ALL SELECT 'B', 4,…
user7393973
  • 2,270
  • 1
  • 20
  • 58
2
votes
1 answer

Set ui datepicker max/minDate on the fly

Thought it would be more easier than it is. Task: 1)disable future days. (Set maxDate as today - done) 2)from js variable get date and set it as a minDate on the fly - how? main function (which I use for few pages): jQuery( function($){ …
karlisup
  • 672
  • 12
  • 22
1
2 3
9 10