Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Date Field Format and Caption not Working

I was playing around with adding a < DateField ...> to our Ribbon frame and I set the "Caption" attribute to 'Date' and the "Format" attribute to 'MM/DD/YYYY' and neither seemed to take effect.

The date field is appearing on the Ribbon, but I am not seeing a caption and the date format is represented in the default date format of 'DD/MM/YY'.

Here is my XML for the date field:

< Group Key="DATE_GROUP" Caption="Test Date Group">
< DateField Key="DTF_TEST" Caption="Date" Width="120" Tooltip="This is a date field." Format="MM/DD/YYYY" />
< /Group>

Note: I put spaces after the "<" so the XML would show up in this forum post. Those spaces should be removed and are not actually in my XML.

Can you tell if there is something wrong with my XML or is it something else?

Thank you for any help!

I am using version 4.1.2 RC2, 06/14/2018 3:43 PM.

Comments

  • Hi Adam,

    I test this out on my own sample ribbon control, and can confirm there seems to be some issues - both with the caption and format as you described. We'll look into this and report back.
  • Hello Frank,

    Thank you! That sounds great. Just let me know when there is more information. I appreciate your prompt reply!

    Thanks,
    Adam Chan
  • Adam,

    I new release candidate of the SRPcontrols resolves the issue with the format tag. This will be version 4.1.2 RC5.

    Caption however, is not supported for DateFields. The workaround for this would be to use the Label control to put a text label near your DateField control:

    <Label Key="STA_LABEL" Caption="Enter Date Here: " Height="23" />
    For more info on the label control, see this help entry at https://wiki.srpcs.com/display/RibbonControl/Label+Controls.

  • Frank,

    Thank you. I will try to download that and test it out soon. And the label should work fine for a caption. Much appreciated!

    Thanks,
    Adam
Sign In or Register to comment.