• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Date picker property ?

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

    Date picker property ?

    Hello,
    Its possible to add a date picker (day/month/year) like a time picker of this example?
    https://ninjatrader.com/support/foru...properties-nt8


    Code:
    [Gui.PropertyEditor("NinjaTrader.Gui.Tools.TimeEditorKey")]
    public DateTime MyTime {get; set;}

    #2
    Hello ninjo,

    Thank you for the post.

    You can do this using the following syntax:


    Code:
    protected override void OnStateChange()
    {
        if (State == State.SetDefaults)
        {
            MyDateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
    
        }
    }
    
    [NinjaScriptProperty]
    [PropertyEditor("NinjaTrader.Gui.Tools.ChartAnchorTimeEditor")]
    [Display(Name="MyDateTime")]
    public DateTime MyDateTime { get; set; }



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by marekflys, Yesterday, 03:07 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by w0lverine, Today, 03:57 AM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by hundert, 02-24-2019, 07:55 AM
    2 responses
    43 views
    0 likes
    Last Post jpraema
    by jpraema
     
    Started by digibob, Today, 02:47 AM
    0 responses
    2 views
    0 likes
    Last Post digibob
    by digibob
     
    Started by NinjaCustomer, Today, 12:57 AM
    1 response
    5 views
    0 likes
    Last Post NinjaCustomer  
    Working...
    X