It seems like you need to do some reading up on basic Javascript, or at least the Date object. getDate() returns the day of month.
Announcement
Collapse
No announcement yet.
X
-
thank you
I've never used the JS!
here's what I do:
Code:isc.IButton.create({ ID: "RappelsButton", left: 310, icon: "[SKIN]actions/filter.png", title: "Filtrer", click: function () { var d = RappelsForm.getValue("crm_obj_dnac"); var start = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0, 0); var end = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 23, 59, 59); var advancedCriteria = { _constructor: "AdvancedCriteria", operator: "and", criteria: [ { fieldName: "crm_obj_dnac", operator: "greaterThanOrEqual", value: start }, { fieldName: "crm_obj_dnac", operator: "lessThanOrEqual", value: end } ] } var c ={crm_kind_can_alert:true , crm_obj_isactive: true} var crit = isc.DataSource.combineCriteria(c,advancedCriteria.getCriteria()); RappelsGrid.fetchData(crit); } });
Last edited by debutant_ISC; 25 Feb 2014, 09:27.
Comment
-
Unfortunately, we can't help you any further until you've googled and read up on Javascript, and can provide sample code that is actually valid javascript - in your latest code, its not clear why you think that advancedCriteria.getCriteria() might be an API that actually exists, but it isn't.
And so that latest code has a bug that *must* be generating a great big error message in the Developer Console. If you don't know what the Developer Console is (the SmartClient one), google that too.
Comment
-
thank you I solved the problem!
I still have two questions if you can answer me please
here is the link:
http://forums.smartclient.com/showth...566#post116566
http://forums.smartclient.com/showth...702#post116702
Comment
Comment