SAPUI5 DatePicker how to forbid manual / keyboard entry while change the date through calendar is possible? - datepicker

I would like on my DatePicker to force the user to use the calendar and not the keyboard to enter a date.
How can I do that ? I've tried readonly but that does not work.
Thank you

You can use CSS since ultimately the code is HTML.
<DatePicker class="disabledInput"/>
.disabledInput input.sapMInputBaseInner {
pointer-events: none;
}
Another way would be to extend the standard sap.m.DatePicker to put disabled attribute for this input field as well.

Related

UWP DatePicker Update Value on DatePart-Changed, do not require "OK" button

Using either Xamarin.Forms (for UWP), or pure UWP, How do I force the Date value binding to update as soon as a date-part is changed, without requiring the user clicks the "OK"/done/checkmark button?
<DatePicker Date="{Binding StartDate, Mode=TwoWay}" />
The DatePicker template allows you only to change how the control looks like when it is not in the picker mode, but rather when it displays the picked date: https://msdn.microsoft.com/en-us/library/windows/apps/mt299121.aspx?f=255&MSPPError=-2147217396
So basically you would have to make a new DatePicker from the scratch to achieve that.

How to get a text from disabled text box in selenium IDE?

the Scenario is as follows:
A text box is disabled for editing manually.To change a text value in a text box a button needs to be clicked. After clicking on a button,a window appears with a drop down list.select a value from drop down and then only text within disabled text box will change.
I need to get value from that textbox to check and then again to check a changed value.
If you install the jQuery add-on (Which is just a small addition to your user-extensions.js file), you can then use jQuery to ascertain (and grab) the value of the text field.
Below is the full jQuery code you need to add (Or create in), your user-extensions.js field.
function jQuery (selector)
{
return selenium.browserbot.getUserWindow().jQuery(selector);
}
Once you've done that, the .val() Method of getting items will work a treat such as.
jQuery('selector').val()
Happy to help :)
The way I'd do this is to use the disabled status as a locator
<tr>
<td>store</td>
<td>css=[disabled=disabled]</td>
<td>text</td>
</tr>
If there is more than one disabled field on there you could just ad an nth modifier to find the specific field you're after, e.g.
<td>css=[disabled=disabled]:nth(1)</td>

Add Tooltips to helper html.dropdownlist in asp.net mvc

I have a dropdownlist that displays just products codes 101,102,103
If the user hovers over a product code I would like the title to appear as a tooltip.
So it's not your normal DataValue & DataText scenerio, because "101" would be both the display text & the value.
I believe I will need to use jQuery to achive this effect.
And I also believe I would need to set the Title attribute of each list item as the Product Title.
My question is, using helper html.dropdownlist how can I set the title attribute?
Thanks, this is my first day using MVC
We used tipsy once for something very similar. http://plugins.jquery.com/project/tipsy
We actually took it a step further and "created" an attribute like this
<span class="tipsyItem" tipsy="This is my tooltip text!">This is my regular text!</span>
The reason was that tipsy would still show the regular tooltip on occasion. We used some of the advanced settings like this.
$('.tipsyItem').tipsy({title: 'tipsy'});
Plus you can theme it. Also were even able to get it to support html embedded in the tooltips for links and such.
$('.tipsyItem').tipsy({html: true });
Twitter used to use tipsy. I'm not sure if they still do.

How do you programatically remove (not disable) a button from TinyMCE?

I can disable the table button using this:
tinyMCE.activeEditor.controlManager.get('divId_table').setDisabled(true)
but what I'm interested in is actually hiding it. Any idea on how to accomplish that?
Thank you!
First, you have to use the advanced theme.
Then, add this option in the TinyMCE init code.
tinyMCE.init({
...
theme_advanced_disable : "bold, justifyleft, justifyright"
});
I hope this might help someone.
source
list of elements' name here
I'm not familiar with TinyMCE myself, but since you appear to have javascript access to the element itself, all you need to do is set it's display property to "none".
document.getElementById("theButton").style.display = "none";
incase ur trying to hide a specific button, use the following code.
$('.mce_cut').hide() //hides cut button
lookup other button titles using firebug in case u wish to hide something specific.
Incase you are looking to hide specific editor's button, modifiy the jquery selector to select correct sibling/descendent.
alternately, try this ..
tinyMCE.activeEditor.controlManager.controls.ctl00_SPWebPartManager1_g_5005db96_e035_4197_a958_75f008b35061_ctl00_tbKeywords_cut.remove()
Note that ctl00_SPWebPartManager1_g_5005db96_e035_4197_a958_75f008b35061_ctl00_tbKeywords is my asp.net control's id. Don't bother about this if ur not using Asp.net serverside textbox control. In case you are.. <% theTextBoxID.ClientID %> gets u that.
Use the following (using jQuery; a non-jQuery approch is easily built):
var elem = $(ed.id+'_'+'divId_table')
elem.addClass('mceButtonDisabled');
elem.removeClass('mceButtonEnabled');

datepicker - open popup by clicking a href tag

I wonder how I can call the datepicker script from a link, something like
<div id="datepicker_popup">Choose Date</div>
and submit the chosen date to a PHP page. Any ideas? Thanx, chris
You could use css to format the textbox to look like a normal link. That way you'd not need to play about with it that much? :)
I would suggest using Jquery datepicker