Problem Date picker

  • Hi to all,

    i am new to extjs...

    i worked in the example of grid/mysql/php, it works fine.

    if user edit the datefield and choose the date picker ,its save in db as fine


    i want like this...
    if user unselect the date ...its default take the current date and insert in db


    help me



    sorry for my bad english

    Thnks in advance


  • if you try DatePickerPlus (http://extjs.com/forum/showthread.php?p=148587#post148587), you will have an additional event called "afterdateclick" which delivers the clicked date (of course) and the state (selected or unselected). (useful for multiselection)

    For single selection you can try the "select" event to recognize a date-change and update your database.

    See first post (http://extjs.com/forum/showthread.php?p=148587#post148587) of DatepickerPlus for full API Docs.


  • hi thanks for your kind help. That link was more helpful to me but still i could nt get proper result. will you please provide me a sample code.



    please help me


  • hi thanks for your kind help. That link was more helpful to me but still i could nt get proper result. will you please provide me a sample code.


    considering you use datepickerplus, a config for a Datefield could look like this:

    {
    xtype: 'datefieldplus',
    listeners:{
    'afterdateclick':function(dp,date,state){
    /*
    do something here
    dp --> the datepickerobject
    date --> the date the user clicked on
    state=true --> date was selected
    state=false --> date was unselected
    */
    }
    } ,
    multiSelection:true,

    },

    This should be a good start.

    You can look at several examples of DatePickerPLus here (http://www.lubber.de/extjs/datepickerplus)







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Problem Date picker , Please add it free.