![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@smartface/component-calendar
Advanced tools
Run this on a terminal pathed to the root directory of project
(cd scripts && npm i @smartface/component-calendar)
import { Calendar } from '@smartface/component-calendar';
import specialDaysConf from './specialDays.json';
const myCalendar = new Calendar();
// Please use after Page:onShow is triggered.
myCalendar.changeCalendar("en", "gregorian", specialDaysConf)
// when user select a date
myCalendar.onDaySelect = (dateInfo) => {
}
// changing calendar date
myCalendar.setSelectedDate({month:2, year:2017, day:12});
// It must be based on theme.json below
const customTheme = {
};
import { Calendar } from "@smartface/component-calendar";
import specialDaysConf from './specialDays.json';
const myCalendar = new Calendar({theme: customTheme});
// or
const myCalendar = new Calendar();
// Add and merge new styles
myCalendar.addStyles(customTheme);
import { Calendar } from "@smartface/component-calendar";
import specialDaysConf from './specialDays.json';
const myCalendar = new Calendar();
myCalendar.changeCalendar("en", "gregorian", specialDaysConf)
// Changes special days' data anywhere
myCalendar.setSpecialDays(newSpecialDays)
{
// Provides to use range-selection. Default: true
useRangeSelection=true,
// Provides to use custom theme file. Default: null
theme=null,
// Provides to display only days of the current month. Default: false
justCurrentDays=false,
// Provides to manage calendar state using an external CalendarCore component. Default is null to use internal component.
calendarCore=null,
// Provides to manage styles using external calendar-context component. Default is null to use internal component.
context=null,
// Provides to use or not single day selection. Default: true
useDaySelection=true
}
import { Calendar } from "@smartface/component-calendar";
import specialDaysConf from './specialDays.json';
import customTheme from './customTheme.json';
export default class Page1 extends Page1Design {
router: any;
constructor () {
super();
// Overrides super.onShow method
this.onShow = onShow.bind(this, this.onShow.bind(this));
// Overrides super.onLoad method
this.onLoad = onLoad.bind(this, this.onLoad.bind(this));
const container = new FlexLayout();
container.flexGrow = 1;
this.addChild(container);
const calendar = new Calendar();
calendar.addStyles(customTheme);
container.addChild(calendar);
calendar.changeCalendar("tr", "gregorian", days);
}
}
function onShow(superOnShow) {
const page = this;
superOnShow();
// changing calendar date
this.calendar.setSelectedDate({month:2, year:2017, day:12});
if (System.OS === "Android") {
setTimeout(() => page.btnNext.enabled = true, 300);
}
}
// To create with custom context. It's only for advanced use.
import createContext from "@smartface/component-calendar/components/calendarContext";
const myCalendar = new Calendar({
useRangeSelection: true,
useContext: false,
justCurrentDays: true,
useDaySelection: false
});
const newContext = calendarContext(myCalendar, "mycalendar", customTheme);
// and add/merge new styles
const newStyle = {
};
newContext(newStyles)
The Calendar component is consisted of several elements. Elements are :
You can override new styles like below
const newMonthLabelColorStyle = {
".calendar":{
".header":{
"&_navbar":{
"&_monthLabel":{
"textColor":"#F10000"
}
}
}
}
};
import Calendar from "@smartface/calendar-component/components/Calendar";
const calendar = new Calendar();
// changes calendar month label color to red
calendar.addStyles(newMonthLabelColorStyle);
Changes the calendar's type
Supported Calendars:
Supported Languages:
Called when user presses on a day on the calendar. Calendar injects to callback a selected date object is described above.
Triggered before the Calendar month is changed. And if the hook returns false then it makes the month changing to be canceled.
var calendar = new Calendar();
calendar.onBeforeMonthChange = (date) => {
if (date.month < 6)
return false;
return true;
}
Triggered when month is changed by the user.
Triggered when a day or days range is selected by the user.
Triggered when a day is selected by the user.
Triggered when a day is selected by the user.
To use calendar logic viewless, please check out : CalendarCore
import { CalendarCore } from "@smartface/component-calendar";
const headlessCalendar = new CalendarCore();
headlessCalendar.changeCalendar("tr");
headlessCalendar.subscribe((oldState, newState) => {
});
headlessCalendar.nextMonth();
Create new cloud workspace in the Smartface-Cloud with this repository url. Open Cloud IDE and switch to terminal in the scripts folder. Install dependencies via terminal:
$ cd scripts
$ npm install
Then run command via terminal on the workspace root for TDD
$ yarn run test:watch
and run command to build service layer
$ yarn run dev
Increment the version like:
$ yarn version --patch
Finally run commnand on the scripts folder to publish to npm:
$ yarn publish
or
Github actions will automatically publish the version for you, after merge.
FAQs
Calendar component
The npm package @smartface/component-calendar receives a total of 6 weekly downloads. As such, @smartface/component-calendar popularity was classified as not popular.
We found that @smartface/component-calendar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.