Change ok text of MUI datepicker dialog - material-ui

How can i change datepicker dialog button text from OK to something like Apply. The MUI docs does not provide any props to help me change the title

You can simply pass okLabel prop to your datepicker component.
<DatePicker
okLabel={"Apply"}
{...props}
/>

Related

Why date picker is not appearing when click the placeholder name?

I want to show the ionic date picker when I click string. But instead of that date picker is showing in the page without clicking anything
here is the stackBlitz
here is my code :
<ion-datetime placeholder="pick the date"></ion-datetime>
in TS file I just use above code. I wanted to see the date picker when i click the "pick the date " string
You could wrap an ion-input or ion-button in ion-datetime.
something like that:
<!-- Datetime in overlay -->
<ion-button id="open-modal">Open Datetime Modal</ion-button>
<ion-modal trigger="open-modal">
<ng-template>
<ion-content>
<ion-datetime></ion-datetime>
</ion-content>
</ng-template>
</ion-modal>
more in the documentation:
https://ionicframework.com/docs/api/datetime

Label in Datepicker in Material UI not centered

I have followed the simple example on Matererial-UI
import React from 'react';
import DatePicker from 'material-ui/lib/date-picker/date-picker';
const DatePickerExampleSimple = () => (
<div>
<DatePicker hintText="Portrait Dialog" />
<DatePicker hintText="Landscape Dialog" mode="landscape" />
<DatePicker hintText="Dialog Disabled" disabled={true} />
</div>
);
But the output (image below) is not right, the blue label is not centered.
I am using: Material UI version 0.15.0-alpha.2, React 0.14.7, chrome 49
Am I missing something?
The DatePicker is being redesigned at the moment and this issue should be fixed among others soon.
Watch this Pull-Request for updates:
https://github.com/callemall/material-ui/pull/3739
If you need the layout fixed immediatly, use 0.15.0-alpha.1 or older

To style button with a standard SAPUI5 icon

How to style button with a standard SAPUI5 icon?
<Button
icon="sap-icon://notes"
text="Справки"
press="onOpenRef"
class=" sapThemeHighlight-asBackgroundColor "/>
It is necessary that the button was in the shape of a circle and green.
How can I do it (preferably standard SAPUI5 methods)?
Thank you.
To make it green, you could use the ButtonType Accept although that might carry some semantic meaning.
SAPUI5 itself doesn't offer a property on the Button to make it round, so you would have to use CSS instead.
To create a Button as in your image, add the style class roundButton and add the following CSS to your stylesheet:
.roundButton .sapMBtnInner {
border-radius: 2.5rem;
}
Creating the Button in XML:
<Button class="roundButton" icon="sap-icon://notes" tooltip="Справки" type="Accept" />
and JavaScript:
new sap.m.Button({
icon: "sap-icon://notes",
tooltip: "Справки",
type: "Accept"
}).addStyleClass("roundButton");

How can I enable tinyMCE in Umbraco to add a div with a class attribute and contain a paragraph?

I need to allow add a div with a class attribute in tinyMCE in Umbraco. I can add a div, but all content in the div is just text. I need that text has a paragraph, and finally add a class attribute for the div.
It's a little hard to understand what you are asking, but I think this should help.
http://our.umbraco.org/wiki/recommendations/recommended-reading-for-content-editors/adding-styles-to-the-tinymce
You can basically associate a stylesheet with the tinyMCE and then add styles to it that will appear in the style dropdown
You may use
tinymce.activeEditor.execCommand('insertHTML', false, '<div class="section'></div>');
This will insert the specified html into the editor at the local caret position.
Be aware that your valid_elements and valid_children configuration settings won't strip out anything from the html that you insert.
If you can paste your template code then we can be more of a help to you.
What you want to do is wrap your <umbraco:Item field="aliasOfYourRTE" runat="server" />
with the div you want so in your case your code will look like this:
<div class="YOURCLASSNAMEHERE">
<umbraco:Item field="bodyText" runat="server" />
</div>
The umbraco RTE automatically spits out <p> </p> tags when content is inserted. Also, make sure you are publishing your node so that your content is viewable on the front end.
Hope this helps.
Go to Settings - Styles.
Open the stylesheet with the styles for the Format dropdown of TinyMCE in Data Type Richtexteditor.
Add a style with the Alias div.class, e.g. div.alert alert-danger.
If you then click in TinyMCE on a paragraph and then choose in the Format dropdown this style the paragraph is formatted as follows:
<div class="alert alert-danger"> ... </div>
Is this what you wished to do?

How to display everyone of the label and the radio choices in its own line?

I'm using Struts2. By default, when using the struts form, the label and the choices are displayed in the same line. How can I do to make the label in a line, and every radio choice in its own line? Is there a way by CSS? I need your help guys. Here it is how my form looks like. Thank you!
<s:form action="resultAction" namespace="/">
<s:radio label="Gender" name="yourGender" list="genders" value="defaultGenderValue" />
<s:submit value="submit" name="submit" />
</s:form>
Which theme are you using as by default struts2 use xHtml theme and which generate certain set of Tables to render the view.
Struts2 use free-marker template to render the HTML for tags and you can customize theme as per your choice or can create you rown theme.
Try with simple theme which will not generate any table or div and will render plain HTML for you are you have all way to apply your custom CSS to change/customize the view.
You can set the theme per page basis on for the whole application for per page basis add the following line in the head section
<s:set name="theme" value="'simple'" scope="page" />
for whole application you can either set in struts.properties file or in struts.xml file though the second one is more preferable.
<constant name="struts.ui.theme" value="simple" />
If you want to play with theme here is the link for same
struts-2-themes