# Control Cursor with Buttons into Spinner Date format 2

**URL:** <https://forum.inductiveautomation.com/t/control-cursor-with-buttons-into-spinner-date-format-2/26975>\
**Category:** Ignition Early Access\
**Created:** [July 30, 2019, 1:50am UTC](https://forum.inductiveautomation.com/t/control-cursor-with-buttons-into-spinner-date-format-2/26975 "2019-07-30T01:50:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [July 30, 2019, 1:50am UTC](https://forum.inductiveautomation.com/t/control-cursor-with-buttons-into-spinner-date-format-2/26975/1 "2019-07-30T01:50:01Z")

</div>

Hi  
So here is what I want to do. Since the operator won’t have access to a keyboard or mouse. I want the operator change the date on the spinner to date month, day, year, hour, min and secs by moving the cursor to left and rigth to the front of the string and tap on the spinner up/down button . Like, for example: " xx/ \<cursor | \> 27/xx/ ".

I migth need to make some scripting on buttons and the spinner. Probably something with `getCaretPosition()` and `setCaretPosition()` , might be usefull. I already binded the spinner to the calendar and works correctly but only changes month because default position of the cursor is at the beginning of the string. I want to have that extra facility to move the cursor with the buttons.

![calendar](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/57fe72dda2fa9af6e96f5cf69806aba85076c28d.png)

I already made a Custom Property (int) that counts from 0-17 up or down (length of the string inside the spinner) that is controlled by buttons right and left. I just need to tell the cursor inside the spinner string to set at 0-17 position. How can I do it?

I will be very grateful to hear some ideas. Thanks. (Sorry for bad English)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 30, 2019, 12:56pm UTC](https://forum.inductiveautomation.com/t/control-cursor-with-buttons-into-spinner-date-format-2/26975/2 "2019-07-30T12:56:25Z")

</div>

It's rude to post topics twice. If you get no response on a topic, it may help if you elaborate in follow-up comments, and add observations on what you've tried in the meantime.

Actual helpful responses to this topic should be posted on the original topic:

> [@Control Cursor with Buttons into Spinner Date format](http://forum.inductiveautomation.com/t/control-cursor-with-buttons-into-spinner-date-format/26934):
>
> Hi So here is what I want to do. Since the operator won’t have access to a keyboard or mouse. I want the operator change the date on the spinner to date month, day, year, hour, min and secs by moving the cursor to left and rigth to the front of the string and tap on the spinner up/down button . Like, for example: " xx/ \<cursor | \> 27/xx/ ". I migth need to make some scripting on buttons and the spinner. Probably something with getCaretPosition() and setCaretPosition(), might be usefull…

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [July 30, 2019, 5:14pm UTC](https://forum.inductiveautomation.com/t/control-cursor-with-buttons-into-spinner-date-format-2/26975/3 "2019-07-30T17:14:53Z")

</div>

Didn’t mean to be rude. Im sorry, just thought I posted in the wrong category or something.  
Thanks
