1.0.6 • Published 4 months ago

@wuilmerj24/time-range v1.0.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

@wuilmerj24/time-range

npm install @wuilmerj24/time-range

Usage

Plain NativeScript

<Page xmlns:tr="@wuilmerj24/time-range">
    <StackLayout class="p-20">
      <tr:TimeRange width="100%" height="100%" drag="onDrag"/>
    </StackLayout>
</Page>
onDrag(ev) {
    console.log('onDrag ', ev.data);
  }

Nativescript Angular

import { NativeScriptTimeRangeModule } from '@wuilmerj24/time-range/angular';

//addd NativeScriptTimeRangeModule to angular NgModule>imports
@NgModule({
    imports: [
        NativeScriptTimeRangeModule,
    ],
})
<TimeRange (drag)="onDrag($event)"></TimeRange>
onDrag(ev) {
    console.log('onDrag ', ev.data);
  }

Properties

PropertyTypeDefault valueDescriptioniOSAndroid
startTimestring00:00The time format is Hh:Mm, for example, 12:00. startTime defines the start time, it is not required.
endTimestring00:00The time format is Hh:Mm, for example, 12:00. endTime defines the end time, it is not required.
sliderColorstringgraysliderColor defines the background color of the slider. Default is gray.
clockLabelColorstringwhiteclockLabelColor defines the color of the numbers.
clockTickColorstringwhiteclockTickColor defines the color of the lines not numbers (in the case of Android, also the lines. iOS not have lines).
maxDurationMinutesnumber0Set the maximum selectable duration by providing minutes between 0 and 1440
sliderRangeColorstringgrayThe color of the active part of the slider wheel.
thumbColorstringgrayThe background color of the thumbs.
sliderRangeGradientStartstringgraySet the starting gradient color of the active part of the slider wheel. Please note that both sliderRangeGradientStart and sliderRangeGradientEnd need to be configured.
sliderRangeGradientMiddlestringgrayOptional for gradient: set the middle gradient color of the active part of the slider wheel.
sliderRangeGradientEndstringgraySet the ending gradient color of the active part of the slider wheel.Please note that both sliderRangeGradientStart and trp_sliderRangeGradientEnd need to be configured.
timeStepMinutesnumber0Determines at what interval the time should be rounded. Setting it to a less accurate number (e.g. 10 minutes) makes it easier for a user to select his desired time.
clockVisiblebooleantrueWhether the clock face in the middle should be visible.
clockLabelSizenumber16Whether the clock face in the middle should be visibleThe text size of the hour labels in the clock (1, 2, 3, etc.). This value is recommended to be set as scale-independent pixels (sp).
sliderWidthnumber10The width of the slider wheel.
thumbIconSizenumber24The size of the thumb icons.
thumbSizenumber28The size of both the starting and ending thumb.
thumbIconStartResstringnullSet the start thumb icon.
thumbIconEndResstringnullSet the end thumb icon.
clockFacestringAPPLEThere a two different clock faces (appearance of the inner clock) you can use, both mimicking the Clock apps: APPLE and SAMSUNG

License

Apache License Version 2.0

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.2

12 months ago

1.0.1

12 months ago