• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Date Format Edit Limitations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date Format Edit Limitations

    I am using a date format field inside of an form widget that needs to be editable, and is currently using dropdown formatting, and I noticed that valence automatically separates it into two distinct boxes, one for the date, and one for time. While this is very convenient, I was wondering if there was any way to edit the behaviors of these two boxes individually. (i.e. changing the time to be selectable intervals of hours instead of every 15 minutes, or having the dropdown selection start from the currently selected time, etc)

  • #2
    Can you try using a form helper program (upon "formRender") to set the value of your field to the current timestamp?

    SetValue('MY_FIELD':%char(%timestamp());

    Let us know if that works for you then we can see what we can come up with to change the increment to hourly next.

    Comment


    • #3
      This is not ideal but you can accomplish the intervals using "Execute Script" under the "Startup" section of your application (in Behaviors).

      Substitute "myForm" with whatever name you give your widget and substitute "MY_FIELD_NAME" with your field name.

      Code:
      var myForm = getWidget('myForm'),
              tf = myForm.down('[name=MY_FIELD_NAME] timefield');
      tf.increment = 60;
      tf.setStore(Ext.picker.Time.createStore(tf.format, tf.increment));
      success();
      In a future release we can provide an easier means to accomplish this.

      Comment


      • #4
        Apologies, I may have been a bit ambiguous with the current timestamp request. For my specific example, the user must put in their clock-out time (which has to be greater than the current time) using the drop down menu for the hourly part of the timestamp fields. By default the drop down menu is already selecting the current time via use of an app variable, but obviously the current time is not a correct input for the user, so they must open the drop down selection and choose a time past the current time. This is where the issue is. Once they open the drop down, the options to select starts at 00:00 instead of the current time causing them to have to usually scroll halfway down the list before getting to any valid inputs. (and also possibly causing confusion between military and standard time) So i was hoping there was a way to have the options to select start from the currently selected time.

        As far as I am understanding gMode and formRender, they don't seem to monitor for the field's selections being open, just the field being created itself, but please feel free to correct me if I am misunderstanding.

        As for the hourly intervals, that part seems to be working so thank you for that!

        Comment


        • #5
          Hi Shawn,

          We have added a feature request to control the min/max of the time dropdown. As for the military/standard time you can change that in Portal Admin > Settings > Nitro App Builder

          Once the setting is changed/saved you will need to logout and log back in to see the change applied to your NAB apps

          NAB 12 Hour.png

          Comment


          • #6
            In the next 6.1 update we will have some new features so you can control the time dropdown a little bit more
            • Ability to override the increment value which currently is 15 minutes
            • Set the min and or max value
            Thanks

            Comment

            Working...
            X