Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajivnarayana/nativescripttimepickersliderplugin
https://github.com/rajivnarayana/nativescripttimepickersliderplugin
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/rajivnarayana/nativescripttimepickersliderplugin
- Owner: rajivnarayana
- Created: 2015-12-22T04:18:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-03T19:41:23.000Z (almost 9 years ago)
- Last Synced: 2023-03-25T21:13:09.666Z (almost 2 years ago)
- Language: TypeScript
- Size: 1.34 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# NativeScript date picker slider plugin
A plugin that enables you to use the cocoapod at https://github.com/rajivnarayana/TimePickerSlider in your native script app.
## Installation
Run the following command from the root of your project
```
$ tns plugin add https://github.com/rajivnarayana/NativeScriptTimePickerSliderPlugin.git
```This command automatically install the necessary ios files from the cocoapod github repository and adds as a dependency in your package.json file
## Examples
There is an sample application at the folder "Example". To run it (assuming you have nativescript plugin installed globally)
```
$ sudo npm install typescript -g
$ tsc
$ cd Example
$ tns plugin add ../
```Run the application from your mac onto your iOS simulator by typing
```
$ tns emulate ios --device=iPhone\ 5s
```The following code from Example/app/main.xml show you a way to add Time picker to your layout
```xml
```
Following code from Exaple/app/main.js shows a way to listen to value changes```js
function onSliderLoaded(args) {
var slider = args.object;
slider.on(observableModule.Observable.propertyChangeEvent, (args) => {
if (args.propertyName == sliderModule.Slider.valueProperty.name) {
console.log('Do something with the data '+slider.value);
}
}, this);
}exports.onSliderLoaded = onSliderLoaded;
```