B4J Library jDatePickerEx - Datepicker with extra functionalities (JavaFx8)

Discussion in 'B4J Libraries & Classes' started by jmon, Jan 25, 2015.

  1. jmon

    jmon Well-Known Member Licensed User

    Hi,

    There is already a javafx 8 datepicker library on the forum, but I needed more functionalities, so I wrote my own datepicker library based on javafx 8 datepicker and localdate.

    Example.jpg

    jDatePickerEx:
    This library offers more than the datepicker functions and methods. It includes parts of the Javafx "java.time.LocalDate" and also some custom functions that I created for my needs, like the autocorrect dates.
    With this library, you can control the date picker, compare the selected date with another, get separately the selected year, month, day of month or add and subtract number of years, months weeks and days to the selected date and event more.

    Requirements:
    - Javafx 8 minimum
    - Scene Builder 2.0 minimum

    Events:
    One event raised when the date has been changed.
    Code:
    Sub datePicker_DateChanged
        
    'Your code here.
        'DatePicker.GetDate
        'DatePicker.GetYear
        'DatePicker.IsLeapYear
        'DatePicker.IsBefore(2015, 1, 1)
        '....
    End Sub
    How to use it:
    1. Copy the included jar and xml files to your additional libraries folder
    2. In SceneBuilder, create a DatePicker node and give it a name.
    3. Initialise jDatePickerEx with the datepicker node previously created.
    I plan to add the option do disable cells later if I have time.

    Comments and critics welcomed!
    Jmon

     

    Attached Files:

    Last edited: Jun 13, 2015
  2. jmon

    jmon Well-Known Member Licensed User

    Library updated : 2015-01-26:
    - New method : Opened: opens or closes the datepicker pop-up. Also returns if the pop-ip is opened or not.
    - You can now scroll the mouse on the edit area of the datepicker to add or substract one day.

    Please download the latest file from the 1st post.
     
  3. jmon

    jmon Well-Known Member Licensed User

    Library updated : 2015-01-26 (2):
    - Event had wrong number or underscores.

    Please download the latest file from the 1st post.
     
  4. jmon

    jmon Well-Known Member Licensed User

    Library updated : 2015-01-9:
    - New methods:
    • Editable : Get or set the editable state
    • Enabled: Get or set the enabled state
    • Opened: Get or set the opened state
    • Tag: Get or set an object tag linked to this node
    • Visible: Get or set the visible state

    Please download the latest file from the 1st post.
     
  5. alfredosab

    alfredosab New Member Licensed User

    I need a empty datapickerex. how can i do.
    Thank
     
  6. jmon

    jmon Well-Known Member Licensed User

    I've updated the library and added a new method "SetDateToNull".
    Be careful with that because you will get nullPointerExceptions if you try to get the date or alter the date with some of the provided methods.
     
  7. alfredosab

    alfredosab New Member Licensed User

    Great.
    Thanks a lot Jimon
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice