Kendo datepicker select today onward only - kendo-ui

I had this date range in here, but I want date from only can select today and onward only.
Meaning I cannot select date previous than today.
dateFrom >= today and dateUntil >= dateFrom
FULL DEMO

You can use min property of datepicker which will set the minimal date range. Updated dojo is here.

Related

Oracle Apex 19 - Date Picker - The application item stores the wrong 20th century, selecting a 19th date from the calendar

On my page I have an application item where the user has to select the date of birth from a date picker calendar. Since the user must be of age (according to Italian law) and I do not allow entry for people over 90, I have set the minimum and maximum to -100 and -18. When selecting the year, if the user selects a 19th century date from the date picker, the system mistakenly stores the corresponding 20th century year. How can I solve? I would like to avoid dividing the date into 3 distinct elements(day+month+year).
I solved the issue with explicit setting the format mask DD-MON-YYYY on the date picker application item. The YYYY format uses the selected century correctly. I guess that by default the date picker format considered is DD-MON-RRRR.
This helps
"What is the difference between 'YYYY' and 'RRRR' in Oracle SQL"
What is the difference between 'YYYY' and 'RRRR' in Oracle SQL

Applying case when date

I have to set the start date as 01-01-year which would be pulled from the expense date field. I have written the below query
select to_date(extract(year from rpt.expense_date),'yyyy') from rpt
How can I set the date to 01-01-year which would be pulled from above query.
Thanks in advance.
Use TRUNC to truncate to the start of the year:
SELECT TRUNC(expense_date, 'YY') FROM rpt
You can just truncate the date value:
trunc(rpt.expense_date, 'YYYY')
By default the trunc() function truncates to midnight on the specified day, equivalent to trunc(<date>, 'DD'), but you can use other elements.
In your code:
to_date(extract(year from rpt.expense_date),'yyyy')
you are only supplying the year element to to_date(); in that situation the other date elements default to the first day of the current month - so today that would give you June 1st in that year, not January 1st. That's hidden away a bit in the documentation:
If you specify a date value without a time component, then the default time is midnight. If you specify a date value without a date, then the default date is the first day of the current month.

node-red-dashboard - Chaining date selection from date-picker

I have to invoke an API based on start_date, end_date and report_type. I know that the date picker does not support time selection which is unfortunate. However, I would like to use the widgets in my dashboard with the following constraints:
Do not enable end_date picker unless start_date picker selection is done.
start_date shouldn't be greater than current date.
end_date shouldn't be less than current date.
Enable drop-down for report_type only when start_date and end_date have been selected.
I have tried some variations of passing the selected value on to next node in flow, adding an object in msg.payload via a function node, etc. But, I can't seem to get the intended behavior. Worse, in one such attempt, I saw end_date defaulting to Unix epoch (Jan 1, 1970)!
Any suggestions on how to use time in date picker and 'chain' them as described above?

Find timestamp in dates

i have table (sample below),
ARTICLE DATE
104425 05.09.2014
105996 24.07.2014
105999 13.07.2014 3:00:00
106005 14.08.2014
106008 05.07.2014
how can i select rows with time in it?
UPD: Colomn DATE have (DD.MM.YYYY) and (DD.MM.YYYY H24:MI:SS) simultaneously
please, try
select * from your_table where trunc(date) != date
Not sure I understand clearly what you want. Does your table have a Time column ? In that case you should do something like :
SELECT * FROM your_table WHERE Time IS NOT NULL;
The Oracle date datatype always has a time component. The way the date is being displayed on your system causes the time to be omitted if it's midnight. In order to get this to do what you want, you need to exclude those times that are at midnight. trunc can be used to set a date to midnight, which is why select * from your_table where trunc(date) <> date works. However, you should be aware that this could cause unexpected side effects if you ever intentionally set the time to midnight.

How to substract year based on month in Oracle SQL

i have a query to retrieve data from current month and previous month..add_months(month,-1) used to get the previous month's data. But there is an year problem in the case of January.
If current month is January 2013, i need December 2012 as previous month. But its showing December 2013.
How can i correct it ?
see query:
SELECT *
FROM ot_day_coll_head, ot_day_coll_items,OM_SALESMAN
WHERE olcd_olch_sys_id = olch_sys_id
AND olch_sm_code=SM_CODE
AND to_char(olch_doc_dt, 'Month')=TO_CHAR(ADD_Months(to_date('January','MM'),-1),'Month')
AND to_char(olch_doc_dt,'YYYY')='2013';
Your query is forcing it to only look at 2013. You don't need to compare the year and month elements separately:
AND to_char(olch_doc_dt, 'YYYY-MM')
= TO_CHAR(ADD_Months(to_date('2013-01','YYYY-MM'),-1),'YYYY-MM')
Presumably you'll just substitute sysdate for the to_date() call since your question refers to the current month.
Quick SQL Fiddle.

Resources