This content has been marked as final. Show 8 replies
thank you for prompt reply.
it work but actuall i forgot to wrote my another requirement before. can I use plsql function within field as you mentiioned. basically if yesterday is either('SAT' or 'SUN') than yesderday should be last Friday. I have a function already to calculate it but where and how to use it or any other solultion available?
Irha10 wrote:A popup calendar does not sound like the best way to present a choice between only 2 values. You're effectlvely saying to users: "here are 30 options, only 2 are valid, pick one of them". The best UI for selecting between 2 options would be a radio group LOV. If users actually understand the choice as being between "today" and "yesterday" then label the radio buttons as Yesterday (01/05/2013) and Today (02/05/2013). Users then only have to use 1 click after scanning 2 options to make a selection, instead of 1 click to open the calendar, and another to select an option after scanning 30+ possible options.
Hi, using apex 4.2.1
i have a page and an item which should display date (pretty easy) but my requirement is field should display only two dates using popup calender today and yesterday so user can select from popup calender and save it in the database.
I have treid as said but user requirement is popup date calender and min and max work fine but I am just digging how to calculate if yesterday is either 'Sat' or 'Sun' then it should be displayed today and last friday. I have a function (plsql) to calculate it but where and how to use it within item? should i go for validation but DA but requirement still that how to show within popup date calender?
Irha10 wrote:Is this honestly the user requirement? Seems somewhat arbitrarily prescriptive. Is the requirement maybe not along the lines of "the user should select a date", rather than "the user should select a date +from a pop up calendar+ "?
I have treid as said but user requirement is popup date calender
I agree with Paul; by introducing between 26 and 29 "wrong" answers, you are giving the users a lot of scope to make mistakes. I think that, when choosing one option from a list of days of the week, a radio-group is much more useable than a date-picker.
and min and max work fine but I am just digging how to calculate if yesterday is either 'Sat' or 'Sun' then it should be displayed today and last friday. I have a function >(plsql) to calculate it but where and how to use it within item? should i go for validation but DA but requirement still that how to show within popup date calender?Again, much easier with a radio-group. Put the following code into the LOV definition for the page item (or a refinement of it - this was off the top of my head):
select 'TODAY' d , sysdate r from dual union all select 'PREV WORKING DAY' d ,case to_char(sysdate-1,'DAY') when 'SATURDAY' then sysdate-2 when 'SUNDAY' then sysdate-3 else sysdate-1 end r from dual
thnaks for help.
I have managed bit. I created two items. one hidden and source come from my function which is last day and then use this item in other item setting in minumum date as &P10_X1. it does work but it still enable all the previous date from today but not forward date. good thing it validate before updating into the table as if user select some date (not yesterday or today) then get an error. I am still working on it but so far good.
Irha10 wrote:You are just making a rod for your own back - this will come back to haunt you methinks...If you are only allowing the user to choose one of two dates, why on earth do you need a date picker?
thnaks for help.
I have managed bit. I created two items...I am still working on it but so far good.