Remove Add Calendar Button from Calendar Chooser

Remove Add Calendar button from Calendar Chooser

I don't think there is any public API to remove the "Add Calendar" button.

The tint color of the buttons are controlled by the global tint of your app. However, setting the global tint in the storyboard only affects views on the storyboard. What the storyboard calls the "global" tint isn't actually the global tint.

Since iOS 14, you can search for "global accent color" in the build settings of your target, set it to a name, then create a color set in the Asset Catalog with that name. That color will then become your app's global tint color. Example:

Sample Image

Sample Image

If your project was created using a rather new version of Xcode, this setting should have already been set for you, and there should already been a color set in the asset catalog called "AccentColor".

Before iOS 14, you would set window.tintColor. See the answers to this.

After that, you don't even need this line:

navigationController.view.tintColor = .orange

Hide Calendar Button on DatePicker?

You can use the following css to remove the calendar button

.date-picker > .arrow-button {
-fx-padding: 0px;
}

.date-picker > .arrow-button > .arrow {
-fx-padding: 0px;
}

Edit - To get back the right border :

.date-picker > .date-picker-display-node {
-fx-background-insets: 1 1 1 1;
}

Edit - To apply the above style to only few datepickers

Declare a DatePicker and add a styleclass to it.

DatePicker nonEditableDatePicker = new DatePicker();
nonEditableDatePicker.getStyleClass().add("non-editable-datepicker");

Use this styleclass to add styles :

.non-editable-datepicker > .arrow-button {
-fx-padding: 0px;
}

.non-editable-datepicker > .arrow-button > .arrow {
-fx-padding: 0px;
}

.non-editable-datepicker > .date-picker-display-node {
-fx-background-insets: 1 1 1 1;
}

Remove or change the calendar icon from angular material datepicker

Angular Material 1.1.0 has a solution, although it seems undocumented.

From angular-material/modules/js/datepicker/datepicker.js:

* @param {String=} md-hide-icons Determines which datepicker icons should be hidden. Note that this may cause the
* datepicker to not align properly with other components. **Use at your own risk.** Possible values are:
* * `"all"` - Hides all icons.
* * `"calendar"` - Only hides the calendar icon.
* * `"triangle"` - Only hides the triangle icon.

Usage:

<md-datepicker ng-model="myModel" md-hide-icons="calendar"></md-datepicker>

How to remove TimePicker (calendar) buttons (now and done) in jsf Primefaces

You can customize the labels by providing a locale and a localization javascript.

You can grab one of the localization javascripts from the primefaces wiki.
After that try the following:

<h:outputScript name=”path_to_your_translations.js” />
<p:calendar value="#{calendarBean.date1}" pattern="MM/dd/yyyy HH:mm" locale="tr" />


Related Topics



Leave a reply



Submit