I am using RadDatePicker control for start and end date input controls on my form.
I am taking "01/01/1980" as min date and "12/31/2049" as max date. I am facing a problem when I enter the date manually in Date text box.
Scenario 1: I enter date as 123129. RadPicker correctly picks it up as 12/31/2029 and displays the formatted date value.
Scenario 2: I enter date as 123130. I get a client side validation warning. No matter what day and month I enter, it freezes every time on year greater than XX/XX/29 (2029).
Scenario 3: I enter date as 12312030 - complete year instead of just last 2 digits. RadPicker correctly picks it up as 12/31/2030 and displays the formatted date value.
I tested all 3 scenarios on ASP.NET Calendar Demo - DatePicker - First Look as well.
I am not sure why the validation kicks in even when the max date is set as 12/31/2049. Please assist me in resolving this issue.
Thanks,
Vaibhav
"The years starting from 30 and greater are parsed as 19.. like if u say 30th(year) it would get it like 1930, 123130 will be parsed as 12/31/1930. this is invalid because the default value of the MinDate i.e. 1/1/1980.
In Order to solve this set the ShortYearCenturyEnd property of the DateInput to 2099.
Hope i answered the question.
Related
I am using the calendar in list mode and a question has arisen. Can I select a specific day?
In the list mode I have a full month loaded, but when I enter for the first time I would like to select a specific day, by default, the day we are on.
Thanks for the comments, but what I need is to show all the information, and be positioned on a specific day, not always on the first day that has information, usually on day 1 of the selected month
It's possible?
Day view
list view
I used the method ".fullCalendar ('gotoDate', moment (" 30/10/2018 "," DD / MM / YYYY "))". In the rest of the views it works correctly but in the list mode the information of that day is not shown but it continues to appear on the day 01/10/2018.
Thank you
In Apex app I've a region called Person on a page. Inside a region there is a masked date picker. I have a task to validate the date of birth. So, the date of birth could not be less 1900 year. In "Conditions" section i'd been trying to write an pl/sql expression:
TRUNC(TO_DATE(:P1002_CONTR_BIRTH_DATE, 'MM-DD-YYYY')) > TO_DATE('01.01.1900', 'MM-DD-YYYY')
but it doesn't work. What am I doing wrong?
You put it to wrong place - "Condition" is used to decide whether an item will (or will not) be rendered on the screen.
Validation should be put into ... well, validation (obviously).
right-click the P1002_CONTR_BIRTH_DATE date picker item
choose "Create Validation"
set its type to "PL/SQL function (returning error text)
use such a code (presuming that you set the date picker format mask to MM-DD-YYYY):
if to_date(:P1002_CONTR_BIRTH_DATE, 'mm-dd-yyyy') < date '1900-01-01' then
return ('Error - can not set it to before 01-01-1900');
end if;
set it to fire when SUBMIT button is pressed
Alternatively (and way simpler) would be to open date picker item's property palette, navigate to its "Minimum date" property and put (for example) -120y in there which will allow dates that are higher than sysdate - 120 years (today, Apex would raise the
Birth date is less than specified minimum date 04-15-1898'
which isn't exactly "1900", but - you can easily calculate it, right? Also, -120y is somewhat more flexible than fixed year 1900.
Now you have two options, pick the one that suits you best.
TO_DATE() method is to convert a string to date, the string format should be the same as format_mask.
TRUNC(TO_DATE(:P1002_CONTR_BIRTH_DATE, 'MM-DD-YYYY')) > TO_DATE('01-01-1900', 'MM-DD-YYYY')
or
TRUNC(TO_DATE(:P1002_CONTR_BIRTH_DATE, 'MM-DD-YYYY')) > TO_DATE('01.01.1900', 'MM.DD.YYYY')
and also make sure :P1002_CONTR_BIRTH_DATE is also the same as format.
For detail
I need to put start date and end date on my page.
It will be only month and year date, with day set to 01 in the start date and to last day of month in the end date.
How can I achieve this feature?
I have tried the Ajax MaskedEditExtender, but when I put 99/9999 in the mask, with the maskType="Date", it give me a javascript error, because the day is missing.
I take it you are trying to validate the entry. I suggest you use a CustomValidator - you'll need to write your own JavaScript for the client-side validation and another validation method for the server-side validation. All you need to do is split the string on / and check the first part is in the range 1..12 and the second part is a valid year.
I am really stucked at this.what i want is that there should be 6 table cells in which i should have days with date. like
Monday 4/3/2013 Tuesday 5/3/2013 and so on till saturday
.i have two more buttons,previous week and next week button.. it should automatically show next week when i click the next week button and should show the previous week whenever i press the previous button..
also the i need to take the value of days/month and year so that i can use them in where clause in my sql query..pls its urgent can anyone help me with this...
im providing a link you can see what exactly i want by visiting this link
www.test.ginormous.in/dinesmart/Filestore/Food/Capture.png
i am just giving you the outline as posting the whole code is not possible.
create an asp:panel in your aspx page
try generating the table structure dynamically inside that panel by writing myPanel.innerhtml = "(your html structure generated in a string)"
use theDate.AddDays(7 - (int)theDate.DayOfWeek) to get the date for this weeks sunday.(where theDay is the current date or the date given by you and change 7 to 6 if you want it for monday as this returns date for sunday etc..)
on previous and next click you can add or subtract 7 days from the first day of the weel that is generated above.
hope this helps you.
This might be a simple question. But I am trying to use a rule in an InfoPath field where if a user enters a certain value in a text box, a date box will populate with a certain date.
Example: User enters "Orange" in the Textbox1 field. Datefield1 should populate with 11/30/2010.
The problem is I have no idea how to setup/format the date in the rule box. See picture for details.
InfoPath marks the format as invalid. I've tried 2011-Nov-30, 30-Nov-2011, and a few more. Any ideas?
It has to be the date format yyyy-mm-dd ("2010-01-01"). Alternatively you can use the date function today() if it is always going to be the current date.