Message Boards Message Boards

1
|
7415 Views
|
9 Replies
|
7 Total Likes
View groups...
Share
Share this post:

[?] Choose dates dynamically with a Slider?

Posted 7 years ago
POSTED BY: Laurens Wachters
9 Replies
POSTED BY: Neil Singer
Posted 6 years ago
POSTED BY: Updating Name
POSTED BY: Neil Singer
POSTED BY: Laurens Wachters
POSTED BY: Neil Singer
POSTED BY: Laurens Wachters

Dynamic then should be an outer wrapper not the inner:

list={
    {2000,1,3},{2000,1,4},{2000,1,5},{2000,1,6},{2000,1,7},
    {2000,1,10},{2000,1,11},{2000,1,12},{2000,1,13},{2000,1,14}};

Method 1 - indexed variable

Column[{
    Slider[Dynamic[m],{1,10,1}],
    Dynamic[DateString[DateObject[list[[m]]]]]}]

enter image description here

Method 2 - list of variables

Column[{
    Slider[Dynamic[m],{DateString[DateObject[#]]&/@list}],
    Dynamic[m]}]

Method 3 - localized variable

Manipulate[DateString[DateObject[m]], {m, list, Slider}]
POSTED BY: Vitaliy Kaurov
POSTED BY: Neil Singer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract