Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Custom RelativeDateString in presetOptions, which includes an "N" number?

    SmartClient Version: v10.0p_2015-12-02/Pro Deployment (built 2015-12-02)

    Sorry if my title is misleading. What I am trying to do is include an option in the presetOptions of a RelativeDateItem that will allow for me to customize how that value is placed in the RelativeDateString that I create. This is somewhat hard to explain semantically, but if you think about it in terms of application, I want to let the user do something along the lines of "First day of the month, N months ago".

    For example, the key-value pair that I would add to the preset options would be something like this:
    Code:
    "-$m[-0M]": "First day of the month, N months ago"
    In the above example, the user would be given a quantity field and if the user were to select "2" from the that field, the resulting RelativeDateString would be converted to "-2m[-0M]". Basically replace the "$" symbol with the value that they selected.

    I kind of doubt that there is this type of functionality at this point, but if there is could you please point me in the right direction? If there is another way that I can achieve this in the way that I have described, I am more than willing to give it a shot. I would just really like to avoid having to create more options for every amount of months, years or weeks that we will need to capture.

    Thank you in advance.

    #2
    Does anyone have any information on this?

    Comment

    Working...
    X