Class: Glib::JsonUi::ViewBuilder::Fields::Timer

Inherits:
Text show all
Defined in:
app/helpers/glib/json_ui/view_builder/fields.rb

Overview

Timer/stopwatch field for time tracking.

Can count up (stopwatch mode) or down (countdown timer mode). Supports min/max time constraints.

Examples:

Countdown timer (backward)

form.fields_timer \
  width: 160,
  styleClasses: ['outlined'],
  label: 'Timer',
  name: 'user[timer]',
  value: 60,
  min: 30

Stopwatch (forward)

form.fields_timer \
  width: 160,
  styleClasses: ['outlined'],
  label: 'Stop Watch',
  name: 'user[stop_watch]',
  value: 10,
  max: 20,
  forward: true

See Also:

  • Garage example

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Method Summary

Methods inherited from AbstractField

#autoValidate, #context, #created, #default_url_options, #determine_value, #disableDirtyCheck, #hint, #hint_args, #label, #label_args, #name, #placeholder, #placeholder_args, #prop, #validation, #value

Methods inherited from View

component_name

Methods inherited from JsonUiElement

#initialize, #props

Constructor Details

This class inherits a constructor from Glib::JsonUi::JsonUiElement