{"id":1585,"date":"2015-02-18T00:45:36","date_gmt":"2015-02-17T16:45:36","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=1585"},"modified":"2017-12-14T14:32:58","modified_gmt":"2017-12-14T06:32:58","slug":"time-menu-4-3-2","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/time-menu\/time-menu-4-3-2\/","title":{"rendered":"Date\/Time Range Picker (4.3.2)"},"content":{"rendered":"<p class=\"left-bar\">This article applies to versions 4.3.2 and earlier of P2 Explorer. For help on the latest version of the date\/time range picker, see <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/time-menu\/\">Date\/Time Range Picker<\/a>.<\/p>\n<p class=\"note\">This article describes how to add a Date\/Time Range\u00a0Picker control to a page during the page design process. For details on how to use the Date\/Time Range\u00a0Picker\u00a0during run time, see: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/using-the-page-controls\/using-time-pickers\/\">Using Time Pickers<\/a>.<\/p>\n\n<h3 class=\"page-subheading\">Overview<\/h3>\n<p class=\"intro-text\">The Date\/Time Range Picker\u00a0provides 2 date\/time pickers, and lets the user select two different date\/times. These are usually used to provide a start time and end time for other controls on the page, such as a chart or trend.<\/p>\n<p class=\"intro-text\">The user can select the start time to be a specific date or time, or they can specify a duration that precedes the end time (e.g. 12 hours from the end time).<\/p>\n<p class=\"intro-text\">The user can specify the end time as a specific date and time, or select the current date and time (i.e. \"Now\").<\/p>\n<p class=\"intro-text\">The following diagram shows a Date\/Time Range Picker\u00a0control being configured:<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangepicker.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2904 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangepicker-800x247.png\" alt=\"\" width=\"800\" height=\"247\" \/><\/a><\/p>\n<div style=\"position: relative;\">\u00a0<\/div>\n<table>\n<tbody>\n<tr>\n<td width=\"130\"><strong>Start Date\/Time<\/strong>:<\/td>\n<td>The start of the time\u00a0range that is initially displayed when the page first loads. This is displayed on the left. This must be created as an\u00a0<a title=\"Events\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/events\/\">event<\/a> with a type of <em>Datetime<\/em>. By default, this event is called <em>startTime.<\/em> You can choose a date and time using the date picker.<em>\u00a0<\/em><\/td>\n<\/tr>\n<tr>\n<td><strong>End Date\/Time<\/strong>:<\/td>\n<td>The end of the time\u00a0range that is initially displayed when the page first loads. This is displayed on the right. This must also be created as an\u00a0<a title=\"Events\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/events\/\">event<\/a> with a type of <em>Datetime.<\/em> By default, this event is called<em> endTime.<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3 class=\"page-subheading\">Tutorial<\/h3>\n<p class=\"intro-text\">The Date\/Time Range Picker\u00a0is a useful control that enables users to change the type of data that is returned to other controls on a page.<\/p>\n<p class=\"intro-text\">In this tutorial, we'll look at adding a Date\/Time Range Picker\u00a0that will change what is displayed on a <a title=\"Charts\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/charts\/\">chart<\/a> as the user selects different times.<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenulive.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2384 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenulive-800x295.png\" alt=\"timemenulive\" width=\"800\" height=\"295\" \/><\/a><\/p>\n<p class=\"intro-text\">Let's go through this process, step-by-step.<\/p>\n<hr \/>\n<h3 class=\"page-subheading\">Step by Step: Creating a Time Menu\u00a0that Drives a Line\u00a0Chart<\/h3>\n<p class=\"intro-text\">Before you start, open a new tab in Explorer and click the \u201cCreate a New Page in Studio Mode\u201d thumbnail. Choose the <a title=\"Grid Layout\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/grid-layout\/\">grid<\/a>\u00a0layout - you can adjust the rows and columns if you like but it's not important for this exercise.<\/p>\n<p class=\"intro-text\">If you have access to the training environment, you can follow the steps exactly as outlined here. Otherwise, you will need to adjust the configuration to suit your data.<\/p>\n<p class=\"intro-text\"><strong>Step 1. Add the Date\/Time Range Picker\u00a0to the page<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangedrag.png\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2907 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangedrag-800x434.png\" alt=\"\" width=\"800\" height=\"434\" \/><\/a><\/p>\n<p class=\"intro-text\">Drag and drop the Date\/Time Range Picker component\u00a0onto a grid cell.<\/p>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\">\u00a0<strong>Step 2.\u00a0\u00a0Configure the Date\/Time Range Picker<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangeconfig.png\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2908 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangeconfig-800x518.png\" alt=\"\" width=\"800\" height=\"518\" \/><\/a><\/p>\n<p class=\"intro-text\">By default, the Date\/Time Range Picker\u00a0uses events to configure all its options. In fact, you'll notice that the\u00a0events all come preconfigured with event names. This is because these events are so often used, and by other controls on the page, that it's often unnecessary to bother changing the names. It's best to leave the names as is, but you can change them if you want. If you do change them, you'll need to remember this for the next steps.<\/p>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\">\u00a0<strong>Step 3.\u00a0\u00a0Create the events<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangeevents.png\" rel=\"lightbox-4\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2912 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/datetimerangeevents-800x538.png\" alt=\"\" width=\"800\" height=\"538\" \/><\/a><\/p>\n<p class=\"intro-text\">This step provides the hooks for the Date\/Time Range Picker\u00a0to send and receive signals to and from other controls on the page.<\/p>\n<ul class=\"intro-text\">\n<li>Click the <em><strong>Set Defaults<\/strong><\/em> button on the far right side of the Studio toolbar.<\/li>\n<li>Create\u00a0an event called <em>\"startTime\"<\/em>\u00a0with a Datetime set to 1 February 2015 12:00:00 AM.<\/li>\n<li>Create an event called <em>\"endTime\"<\/em> with a Datetime set to 16 February\u00a02015\u00a012:00:00 AM.<\/li>\n<li>Create an event called <em>\"tags\"<\/em> with a Text value\u00a0set to:<br \/>\n <em>(SeriesExp(Sin(Integer(Time()))) * 100) + (SeriesExp(Random()) - 50),(SeriesExp(Sin(Integer(Time()))) * 100) + {DecimalTag},SeriesExp(Sin(Integer(Time()))) * 100<\/em><\/li>\n<\/ul>\n<p class=\"intro-text\">The Tags event is what we will use to retrieve time series data in the next step.<\/p>\n<ul class=\"intro-text\">\n<li>You can create an\u00a0<a title=\"Page Events\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/events\/\">event<\/a> at any time. In creating these events, we make them available not only to the Time Menu but also to any other controls we may want to place on the page.<\/li>\n<\/ul>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\"><strong>Step 4. Add and Configure Data<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenudata.png\" rel=\"lightbox-5\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2393 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenudata-754x600.png\" alt=\"timemenudata\" width=\"754\" height=\"600\" \/><\/a><\/p>\n<p class=\"intro-text\">Date\/Time Range Pickers don't normally do anything by themselves - you use them to drive other components.\u00a0Ultimately, we want the Date\/Time Range Picker\u00a0to change the returned data depending on what\u00a0dates the user selects. Let's add some data\u00a0that we will use to return data to a chart. Add a <a title=\"Add Time Series Data\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/add-data\/add-time-series-data\/\">model<\/a> and configure it as follows:<\/p>\n<ul class=\"intro-text\">\n<li>Name: Time Series Data<\/li>\n<li>Using: Tags<\/li>\n<li>Tags: (Event) tags<\/li>\n<li>Group By: None<\/li>\n<\/ul>\n<p class=\"intro-text\">Remember that we created the <em>tags<\/em> event in the previous step. This is the tag that will be plotted on the line chart in the next step.<\/p>\n<ul class=\"intro-text\">\n<li>You can leave the parameters with their default values. We have 2 parameters that can listen to events published by the Time Menu: <strong>StartTime<\/strong>\u00a0and <strong>EndTime.<\/strong> This is what ultimately causes the chart to change when the user selects different dates.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 5. Add and configure a\u00a0chart<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenuchart.png\" rel=\"lightbox-6\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2395 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenuchart-520x600.png\" alt=\"timemenuchart\" width=\"520\" height=\"600\" \/><\/a><\/p>\n<p class=\"intro-text\">Let's add a <a title=\"Line Chart\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/charts\/\">chart<\/a>\u00a0that will make use of the Date\/Time Range Picker. Drag and drop a Chart\u00a0onto another cell on the page. Configure the chart as follows:<\/p>\n<ul class=\"intro-text\">\n<li>Source Data: Time Series Data<\/li>\n<li>For the chart series:\n<ul class=\"intro-text\">\n<li>Type: Line\u00a0series<\/li>\n<li>Y Field: (Text)\u00a0Value<\/li>\n<li>Name Field: (Text)\u00a0Tag<\/li>\n<li>Colour: (Text) (leave this blank)<\/li>\n<\/ul>\n<\/li>\n<li>For the X Axis:\n<ul class=\"intro-text\">\n<li>Field: (Text)\u00a0Timestamp<\/li>\n<li>Data Type: Time<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 6. All done!\u00a0\u00a0<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenulive.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2384 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/timemenulive-800x295.png\" alt=\"timemenulive\" width=\"800\" height=\"295\" \/><\/a><\/p>\n<p class=\"intro-text\">Great work! You now have a fully functioning Date\/Time Range Picker\u00a0that drives a time series line\u00a0chart.<\/p>\n<ul class=\"intro-text\">\n<li>Click the preview\u00a0<a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/preview.png\" rel=\"lightbox-8\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2896\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/preview.png\" alt=\"preview\" width=\"13\" height=\"14\" \/><\/a>\u00a0button on the Studio toolbar to see what your page will look like in run-time.<\/li>\n<li>When the Date\/Time Range Picker\u00a0first loads, the chart displays data for the corresponding default date.<\/li>\n<li>Change the Start Time and see how the chart changes to display the related data.<\/li>\n<\/ul>\n<p class=\"intro-text\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1348\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save.png\" alt=\"save\" width=\"48\" height=\"53\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save.png 48w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save-22x24.png 22w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save-33x36.png 33w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save-43x48.png 43w\" sizes=\"auto, (max-width: 48px) 100vw, 48px\" \/>\u00a0Don't forget to <a title=\"Saving Your Page\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-create-your-first-page\/saving-your-page\/\">save your page<\/a>!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Date\/Time Range Picker provides 2 date\/time pickers, and lets the user select two different date\/times. These are usually used to provide a start time and end time for other controls on the page, such as a chart or trend. This article describes how to add a Date\/Time Range Picker control to a page during the page design process, in versions 4.3.2 and earlier of P2 Explorer. <\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/time-menu\/time-menu-4-3-2\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":4663,"parent":13127,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[11],"tags":[348],"class_list":["post-1585","page","type-page","status-publish","has-post-thumbnail","hentry","category-tutorial","tag-date-and-time-pickers","Product-ex"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/1585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=1585"}],"version-history":[{"count":0,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/1585\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/13127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/4663"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=1585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=1585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=1585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}