Date Helpers API reference for Date Helpers in Semantic UI's reactivity system calendar API Reference
Categories

Date Helpers

Date Helpers are methods available on Signal instances that contain Date objects. These helpers provide a convenient way to update the date value reactively.

now

Sets the value of the Signal to the current date and time.

Syntax

signal.now()

Returns

Date - The new Date object representing the current date and time.

Usage

import { Signal } from '@semantic-ui/reactivity';
const currentTime = new Signal(new Date());
console.log(currentTime.get()); // Output: current date and time
// After some time...
currentTime.now();
console.log(currentTime.get()); // Output: updated current date and time

Example

Previous
Collection Helpers
Next
Query