YUI - 2 buttons open the pop up , how not to reset dialog values - yui

i am using YUI calendar .
I have two buttons which open the dialog
every time the calendar dialog gets opened , it's values are cleared , i want to get the last selected value
e.g
2 buttons one for from date and one for to date
scenario
entering in "from" input calendar 01.01.2020
I would like the "to" button to open calendar with the date 01.01.2020
and not today.

First create a calendar :
var cal = new YAHOO.widget.Calendar("DivContainerID");
cal.render();
then set the selected date on the click of the first button
cal.cfg.setProperty("selected","05/12/2014");

Related

Changing the default radio buttons in a Cognos 11 date prompt

I have a date prompt on my prompt page that is not required and does not accept multiselect. The queries being filtered have the filter set to optional. The prompt does work in terms of filtering, but I want to change the default radio buttons from earliest and latest date to the from and to calendars. I also need to keep the earliest and latest options.
I have tried a few different solutions using js, but none of them have changed the default radio buttons. I am expecting both calendars to display todays date and be automatically selected when the report loads and have the earliest date and latest date buttons in their default position, but unselected.

Is there a way to check if a labelbox has been updated in a manner similar to TextBox_AfterUpdate?

I am making a userform that will allow a user to click on a date in a calendar and update a labelbox on the form with the date (see image attached). I would like to write a code that will check/ensure that the "Week Start" date is always on a Monday, and if not, an error will be displayed and those labels will be cleared.
I have an "Enter" button where I've already coded what I want (see below), but would like to have the error automatically display when the user clicks the wrong date on the calendar.
If there is a way to do this in a manner similar to the TextBox AfterUpdate event, I would be greatly appreciative.
'Error message stored in Enter button if work week is selected that does
'not start on a Monday
If Not Format(datFirstDay, "w") = "2" Then
MsgBox ("Please select a work week that starts on Monday.")
lblStartDate.Caption = ""
lblStopDate.Caption = ""
LengthNo.Caption = ""
End If
Image of what the form looks like.
It looks like the user is selecting the date from the calendar and you are just using the label to display the selected date. It would be helpful to show the code that sets the value of the label. You should associate your error checking with entering the date on the calendar rather than any event related to the label. Talking about events on the label is a red herring.

Add Multiple textbox by add butoon click in .net

I Want to Create a Multiple textbox on add button click three textbox and a droplist should be added on every click and on save button the the value should be saved in database

vba and outputing data from hidden/Non-enabled multipages

I have a userform with various tabs on a multipage. I am using datepickers (Microsoft Date and Time Picker Control 6.0) and textboxes on the different tabs.
The problem occurs when I want to get the data from the hidden, non-enabled or simply non-active multipages to output to the worksheet.
For example, Multipage1 has a Date of Birth, Multipage 2 has a start date.
When I press the command button to execute the output of ALL data across all multipages to the worksheet, it will only output the value for the currently active multipage. The other values are default.
Mulitpage1 active means it will return D.O.B but returns a blank/default start date from Multipage2
Multipage2 active means it will return start date but returns a blank/default D.O.B from Multipage1
Multipage 3 active means neither D.O.B or Start Date will output anything other than their default values.
(Presume all fields across all multipages have actually been completed with a value)
Is there a way around this?
The command button to output data has a long list of statements like these:
Cells(6, 2) = Address1TextBox.Value
Cells(7, 2) = Address2TextBox.Value
Cells(8, 2) = Address3TextBox.Value
DatePicker was the issue here and I know textboxes do not have an issue with being output to the worksheet while hidden/disabled.
With this in mind I had to resort to using a textbox with validation which only allows the user to enter a date.
Answer = Don't use Microsoft Date and Time Picker Control 6.0

Cognos Dynamic Filtering

I searched all over the internet but couldnt find an answer.
I want to create
1. a radio button with two options A, B (which are supposedly two columns in the database with "date" datatype) and
2. a date prompt
Now if the user selects option A with a date range(in the date prompt) the data should be filtered on A
if the user selects option B with a date range(in the date prompt) the data should be filtered on B
Your question is far from clear, but if I understand you want to use the radio button to determine which date column to use in a filter? If so, then something like this should work:
if (?RadioButtonPrompt? = 'A') then ([DateColumnA] = ?DatePrompt?)
else ([DateColumnB] = ?DatePrompt?)
If I get this straight:
1. You first want to create a Radio Button:Value Prompt with values from DB
2. Then you want to filter another Prompt based on selection of the Radio button Prompt. (You can do this by what Andrew has suggested)
To create a Radio button prompt, Drag a Value prompt > Select Radio Button Group (under Select UI) > Select Query > Select Use Value and Display Value
My guess is that you are having trouble creating Query which will just give you a single row with two date columns...
Hope that helps....

Resources